This is a big update towards working protocol transactions.
1. The CONVERT TX is creating the necessary information. 2. The PROTOCOL TX is creating the necessary information. 3. The wallet recognises the subaddress (kind of) on incoming amounts. At present, the PROTOCOL TX outputs are NOT spendable or included in balances.
This commit is contained in:
@@ -157,7 +157,9 @@ struct txpool_tx_meta_t
|
||||
{
|
||||
crypto::hash max_used_block_id;
|
||||
crypto::hash last_failed_id;
|
||||
crypto::public_key destination_address;
|
||||
crypto::key_image input_k_image;
|
||||
crypto::public_key return_address;
|
||||
crypto::public_key one_time_public_key;
|
||||
uint64_t weight;
|
||||
uint64_t fee;
|
||||
uint64_t amount_burnt;
|
||||
@@ -168,7 +170,8 @@ struct txpool_tx_meta_t
|
||||
uint64_t last_relayed_time; //!< If received over i2p/tor, randomized forward time. If Dandelion++stem, randomized embargo time. Otherwise, last relayed timestamp
|
||||
uint32_t source_asset_id;
|
||||
uint32_t destination_asset_id;
|
||||
// 168 bytes
|
||||
// 232 bytes
|
||||
uint8_t tx_type;
|
||||
uint8_t kept_by_block;
|
||||
uint8_t relayed;
|
||||
uint8_t do_not_relay;
|
||||
@@ -179,7 +182,7 @@ struct txpool_tx_meta_t
|
||||
uint8_t is_forwarding: 1;
|
||||
uint8_t bf_padding: 3;
|
||||
|
||||
uint8_t padding[20]; // till 192 bytes
|
||||
uint8_t padding[19]; // till 256 bytes
|
||||
|
||||
void set_relay_method(relay_method method) noexcept;
|
||||
relay_method get_relay_method() const noexcept;
|
||||
|
||||
@@ -382,7 +382,7 @@ typedef struct circ_supply_tally {
|
||||
|
||||
typedef struct yield_tx_data {
|
||||
crypto::hash tx_hash;
|
||||
crypto::public_key destination_address;
|
||||
crypto::public_key return_address;
|
||||
uint64_t amount;
|
||||
} yield_tx_data;
|
||||
|
||||
@@ -1156,7 +1156,7 @@ uint64_t BlockchainLMDB::add_transaction_data(const crypto::hash& blk_hash, cons
|
||||
// Create the object we are going to write to the database
|
||||
yield_tx_data yield_data;
|
||||
yield_data.tx_hash = tx_hash;
|
||||
yield_data.destination_address = tx.destination_address;
|
||||
yield_data.return_address = tx.return_address;
|
||||
yield_data.amount = tx.amount_burnt; // SRCG - this feels as though we are bastardising the variable for an invalid purpose
|
||||
MDB_val_set(val_height, m_height);
|
||||
MDB_val_set(val_yield_tx_data, yield_data);
|
||||
|
||||
Reference in New Issue
Block a user