Skip to content

Commit

Permalink
Merge remote-tracking branch 'quangvu3/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
sumoprojects committed Jul 6, 2018
2 parents 5146913 + d910222 commit dc35ee8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cryptonote_core/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ namespace cryptonote
ADD_CHECKPOINT(100000, "ffe474fe8353f90700c8138ddea3547d5c1e4a6facb1df85897e7a6e4daab540");
ADD_CHECKPOINT(116520, "da1cb8f30305cd5fad7d6c33b3ed88fede053e0926102d8e544b65e93e33a08b"); // v3 fork
ADD_CHECKPOINT(137500, "0a50041b952bdc1b1f2c6a5e8749600f545e43ddfa255607b529df95f8945e5d"); // v4 fork
ADD_CHECKPOINT(165000, "a15ab984e4c93bff84f617daaed357e28c5eb2fb6c64efa803f4cfba0b69f4a4"); // v5 fork
return true;
}

Expand Down
8 changes: 8 additions & 0 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote

// Don't try to extract tx public key if tx has no ouputs
size_t pk_index = 0;
std::unordered_set<crypto::public_key> public_keys_seen;
std::vector<tx_scan_info_t> tx_scan_info(tx.vout.size());
while (!tx.vout.empty())
{
Expand All @@ -765,6 +766,13 @@ void wallet2::process_new_transaction(const crypto::hash &txid, const cryptonote
return;
}

if (public_keys_seen.find(pub_key_field.pub_key) != public_keys_seen.end())
{
LOG_PRINT_L0("The same transaction pubkey is present more than once, ignoring extra instance");
continue;
}
public_keys_seen.insert(pub_key_field.pub_key);

int num_vouts_received = 0;
tx_pub_key = pub_key_field.pub_key;
bool r = true;
Expand Down

0 comments on commit dc35ee8

Please sign in to comment.