Added functions to cache and manage yield calculations
Removed "tx.amount_locked" field - "tx.amount_burnt" is technically correct for all cases. Removed invalid checkpoint data.
This commit is contained in:
@@ -218,11 +218,13 @@ namespace cryptonote
|
||||
FIELD(vout)
|
||||
FIELD(extra)
|
||||
VARINT_FIELD(type)
|
||||
FIELD(return_address)
|
||||
FIELD(source_asset_type)
|
||||
FIELD(destination_asset_type)
|
||||
VARINT_FIELD(amount_burnt)
|
||||
VARINT_FIELD(amount_slippage_limit)
|
||||
if (type != cryptonote::transaction_type::MINER && type != cryptonote::transaction_type::PROTOCOL) {
|
||||
FIELD(return_address)
|
||||
FIELD(source_asset_type)
|
||||
FIELD(destination_asset_type)
|
||||
VARINT_FIELD(amount_burnt)
|
||||
VARINT_FIELD(amount_slippage_limit)
|
||||
}
|
||||
END_SERIALIZE()
|
||||
|
||||
public:
|
||||
|
||||
@@ -167,11 +167,13 @@ namespace boost
|
||||
a & x.vout;
|
||||
a & x.extra;
|
||||
a & x.type;
|
||||
a & x.return_address;
|
||||
a & x.source_asset_type;
|
||||
a & x.destination_asset_type;
|
||||
a & x.amount_burnt;
|
||||
a & x.amount_slippage_limit;
|
||||
if (x.type != cryptonote::transaction_type::MINER && x.type != cryptonote::transaction_type::PROTOCOL) {
|
||||
a & x.return_address;
|
||||
a & x.source_asset_type;
|
||||
a & x.destination_asset_type;
|
||||
a & x.amount_burnt;
|
||||
a & x.amount_slippage_limit;
|
||||
}
|
||||
}
|
||||
|
||||
template <class Archive>
|
||||
@@ -183,20 +185,22 @@ namespace boost
|
||||
a & x.vout;
|
||||
a & x.extra;
|
||||
a & x.type;
|
||||
a & x.return_address;
|
||||
a & x.source_asset_type;
|
||||
a & x.destination_asset_type;
|
||||
a & x.amount_burnt;
|
||||
a & x.amount_slippage_limit;
|
||||
if (x.version == 1)
|
||||
{
|
||||
a & x.signatures;
|
||||
}
|
||||
else
|
||||
{
|
||||
a & (rct::rctSigBase&)x.rct_signatures;
|
||||
if (x.rct_signatures.type != rct::RCTTypeNull)
|
||||
a & x.rct_signatures.p;
|
||||
if (x.type != cryptonote::transaction_type::MINER && x.type != cryptonote::transaction_type::PROTOCOL) {
|
||||
a & x.return_address;
|
||||
a & x.source_asset_type;
|
||||
a & x.destination_asset_type;
|
||||
a & x.amount_burnt;
|
||||
a & x.amount_slippage_limit;
|
||||
if (x.version == 1)
|
||||
{
|
||||
a & x.signatures;
|
||||
}
|
||||
else
|
||||
{
|
||||
a & (rct::rctSigBase&)x.rct_signatures;
|
||||
if (x.rct_signatures.type != rct::RCTTypeNull)
|
||||
a & x.rct_signatures.p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user