mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
rpc: add entry time to getorphantxs
This commit is contained in:
parent
56bf302714
commit
808a708107
1 changed files with 2 additions and 0 deletions
|
@ -823,6 +823,7 @@ static std::vector<RPCResult> OrphanDescription()
|
|||
RPCResult{RPCResult::Type::NUM, "bytes", "The serialized transaction size in bytes"},
|
||||
RPCResult{RPCResult::Type::NUM, "vsize", "The virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."},
|
||||
RPCResult{RPCResult::Type::NUM, "weight", "The transaction weight as defined in BIP 141."},
|
||||
RPCResult{RPCResult::Type::NUM_TIME, "entry", "The entry time into the orphanage expressed in " + UNIX_EPOCH_TIME},
|
||||
RPCResult{RPCResult::Type::NUM_TIME, "expiration", "The orphan expiration time expressed in " + UNIX_EPOCH_TIME},
|
||||
RPCResult{RPCResult::Type::ARR, "from", "",
|
||||
{
|
||||
|
@ -839,6 +840,7 @@ static UniValue OrphanToJSON(const TxOrphanage::OrphanTxBase& orphan)
|
|||
o.pushKV("bytes", orphan.tx->GetTotalSize());
|
||||
o.pushKV("vsize", GetVirtualTransactionSize(*orphan.tx));
|
||||
o.pushKV("weight", GetTransactionWeight(*orphan.tx));
|
||||
o.pushKV("entry", int64_t{TicksSinceEpoch<std::chrono::seconds>(orphan.nTimeExpire - ORPHAN_TX_EXPIRE_TIME)});
|
||||
o.pushKV("expiration", int64_t{TicksSinceEpoch<std::chrono::seconds>(orphan.nTimeExpire)});
|
||||
UniValue from(UniValue::VARR);
|
||||
from.push_back(orphan.fromPeer); // only one fromPeer for now
|
||||
|
|
Loading…
Add table
Reference in a new issue