diff options
Diffstat (limited to 'src/blockchain_db/asset_db.h')
| -rw-r--r-- | src/blockchain_db/asset_db.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/blockchain_db/asset_db.h b/src/blockchain_db/asset_db.h index b5a763b75..a43d86585 100644 --- a/src/blockchain_db/asset_db.h +++ b/src/blockchain_db/asset_db.h @@ -6,6 +6,7 @@ #include "blockchain_db.h" #include "cryptonote_basic/asset_confidential.h" #include "cryptonote_basic/asset_types.h" +#include "cryptonote_basic/asset_wire.h" namespace cryptonote { @@ -38,5 +39,18 @@ namespace assets network_type expected_network, const crypto::hash& carrier_prefix_hash, std::string* error = nullptr); + + // The caller owns the outer blockchain write transaction. Every semantic, + // ownership, collision, and collection-authority check completes before the + // first write so an accepted payload changes registry, output, and spent-key + // state atomically. + bool apply_asset_transaction_to_db( + BlockchainDB& db, + const asset_transaction_payload& payload, + network_type expected_network, + const crypto::hash& expected_carrier_prefix_hash, + uint64_t height, + std::vector<crypto::hash>& output_ids, + std::string* error = nullptr); } } |
