mirror of https://github.com/oxen-io/oxen-core.git
add key derivation for outputs to scanner
This commit is contained in:
parent
56aa4f8caa
commit
aa5bd8ba26
|
@ -77,6 +77,7 @@ namespace wallet
|
|||
spent_height INTEGER NOT NULL DEFAULT 0,
|
||||
tx INTEGER NOT NULL REFERENCES transactions(id) ON DELETE CASCADE,
|
||||
output_key BLOB NOT NULL,
|
||||
derivation BLOB NOT NULL,
|
||||
rct_mask BLOB NOT NULL,
|
||||
key_image INTEGER NOT NULL REFERENCES key_images(id),
|
||||
subaddress_major INTEGER NOT NULL,
|
||||
|
@ -175,13 +176,14 @@ namespace wallet
|
|||
block_height,
|
||||
tx,
|
||||
output_key,
|
||||
derivation,
|
||||
rct_mask,
|
||||
key_image,
|
||||
subaddress_major,
|
||||
subaddress_minor)
|
||||
VALUES(?,?,?,?,?,
|
||||
(SELECT id FROM transactions WHERE hash = ?),
|
||||
?,?,
|
||||
?,?,?,
|
||||
(SELECT id FROM key_images WHERE key_image = ?),
|
||||
?,?);
|
||||
)",
|
||||
|
@ -192,6 +194,7 @@ namespace wallet
|
|||
output.block_height,
|
||||
hash_str,
|
||||
tools::type_to_hex(output.key),
|
||||
tools::type_to_hex(output.derivation),
|
||||
tools::type_to_hex(output.rct_mask),
|
||||
tools::type_to_hex(output.key_image),
|
||||
output.subaddress_index.major,
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace wallet
|
|||
|
||||
crypto::hash tx_hash;
|
||||
crypto::public_key key;
|
||||
crypto::public_key derivation;
|
||||
rct::key rct_mask;
|
||||
crypto::key_image key_image;
|
||||
cryptonote::subaddress_index subaddress_index;
|
||||
|
|
|
@ -79,6 +79,7 @@ namespace wallet
|
|||
o.block_time = timestamp;
|
||||
o.unlock_time = tx.tx.get_unlock_time(output_index);
|
||||
o.key = output_target->key;
|
||||
o.derivation = derivations[derivation_index];
|
||||
|
||||
received_outputs.push_back(std::move(o));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue