mirror of
https://github.com/monero-project/monero.git
synced 2025-12-31 07:00:57 -08:00
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).
This commit is contained in:
@@ -755,6 +755,7 @@ void toJsonValue(rapidjson::Document& doc, const cryptonote::rpc::tx_in_pool& tx
|
||||
INSERT_INTO_JSON_OBJECT(val, doc, last_relayed_time, tx.last_relayed_time);
|
||||
INSERT_INTO_JSON_OBJECT(val, doc, relayed, tx.relayed);
|
||||
INSERT_INTO_JSON_OBJECT(val, doc, do_not_relay, tx.do_not_relay);
|
||||
INSERT_INTO_JSON_OBJECT(val, doc, double_spend_seen, tx.double_spend_seen);
|
||||
}
|
||||
|
||||
|
||||
@@ -777,6 +778,7 @@ void fromJsonValue(const rapidjson::Value& val, cryptonote::rpc::tx_in_pool& tx)
|
||||
GET_FROM_JSON_OBJECT(val, tx.last_relayed_time, last_relayed_time);
|
||||
GET_FROM_JSON_OBJECT(val, tx.relayed, relayed);
|
||||
GET_FROM_JSON_OBJECT(val, tx.do_not_relay, do_not_relay);
|
||||
GET_FROM_JSON_OBJECT(val, tx.double_spend_seen, double_spend_seen);
|
||||
}
|
||||
|
||||
void toJsonValue(rapidjson::Document& doc, const cryptonote::rpc::hard_fork_info& info, rapidjson::Value& val)
|
||||
|
||||
Reference in New Issue
Block a user