mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
discount: implement mempool logic
This commit is contained in:
parent
9cbd3e0f05
commit
b7b2288a74
5 changed files with 96 additions and 11 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <consensus/validation.h>
|
||||
#include <issuance.h>
|
||||
#include <key_io.h>
|
||||
#include <policy/discount.h> // ELEMENTS
|
||||
#include <script/descriptor.h>
|
||||
#include <script/script.h>
|
||||
#include <script/sign.h>
|
||||
|
|
@ -236,6 +237,10 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
|
|||
entry.pushKV("version", static_cast<int64_t>(static_cast<uint32_t>(tx.nVersion)));
|
||||
entry.pushKV("size", (int)::GetSerializeSize(tx, PROTOCOL_VERSION));
|
||||
entry.pushKV("vsize", (GetTransactionWeight(tx) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR);
|
||||
// ELEMENTS: add discountvsize
|
||||
if (Params().GetAcceptDiscountCT()) {
|
||||
entry.pushKV("discountvsize", GetDiscountVirtualTransactionSize(tx));
|
||||
}
|
||||
entry.pushKV("weight", GetTransactionWeight(tx));
|
||||
entry.pushKV("locktime", (int64_t)tx.nLockTime);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue