From ccf53a566c1c2e980ed30a7371b8789ffb4c01a7 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 22 Sep 2017 13:57:20 +0100 Subject: track double spending in the txpool Transactions in the txpool are marked when another transaction is seen double spending one or more of its inputs. This is then exposed wherever appropriate. Note that being marked with this "double spend seen" flag does NOT mean this transaction IS a double spend and will never be mined: it just means that the network has seen at least another transaction spending at least one of the same inputs, so care should be taken to wait for a few confirmations before acting upon that transaction (ie, mostly of use for merchants wanting to accept unconfirmed transactions). --- src/blockchain_db/blockchain_db.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/blockchain_db/blockchain_db.h') diff --git a/src/blockchain_db/blockchain_db.h b/src/blockchain_db/blockchain_db.h index 838385e8a..ca097fad2 100644 --- a/src/blockchain_db/blockchain_db.h +++ b/src/blockchain_db/blockchain_db.h @@ -147,8 +147,9 @@ struct txpool_tx_meta_t uint8_t kept_by_block; uint8_t relayed; uint8_t do_not_relay; + uint8_t double_spend_seen: 1; - uint8_t padding[77]; // till 192 bytes + uint8_t padding[76]; // till 192 bytes }; #define DBF_SAFE 1 -- cgit v1.2.3