Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
530fdc1
fix: include changes for include asset diff in scantxoutset
sucildossj Sep 25, 2025
4c96051
change wallet listunspent api for asset and preconf support
sucildossj Sep 26, 2025
ae12e7f
fix: include reserve support on listunspent
sucildossj Sep 26, 2025
b95a3b5
feat: include send pegout implementation
sucildossj Sep 26, 2025
92c4113
updating changes related to wallet rpc
sucildossj Oct 1, 2025
c132465
include asset id in coutput point
sucildossj Oct 8, 2025
acdb0c7
change asset id as class instead for int64_t
sucildossj Oct 8, 2025
adfefd9
remove blocktype for casset class since asset creation only belong to…
sucildossj Oct 8, 2025
01c9370
include CAsset in coutpoint and updated testcase
sucildossj Oct 9, 2025
1064678
including asset id implementation
sucildossj Oct 15, 2025
eeef259
included changes releated to asset outpoint changes
sucildossj Oct 16, 2025
0adc274
refactor: disable asset creationg and transfer from mempool
sucildossj Oct 16, 2025
cfb5df3
remove asset support on preconf transaction
sucildossj Oct 16, 2025
1bedd91
feat: include utxo fee logic for asset type transaction only
sucildossj Oct 16, 2025
31f7f5a
refactor: fixed unit testing changes for block filter and gensis bloc…
sucildossj Oct 16, 2025
4b69302
include unit test changes after transaction template change
sucildossj Oct 17, 2025
cab395c
included changes on getrawtransaction for asset id
sucildossj Oct 17, 2025
6ccd64f
fix: include diffcult nan fixes on getblockheader
sucildossj Oct 18, 2025
5c2c2f1
including functional testcase hrp changes
sucildossj Oct 18, 2025
7f002c9
include asset doc for scantxoutset
sucildossj Oct 18, 2025
7714c7c
changed primitive class structure based on node
sucildossj Oct 18, 2025
87efb66
updating changes for merkle root changes
sucildossj Oct 18, 2025
bc75e24
include asset transaction test file in repo
sucildossj Oct 21, 2025
651f066
update value on supply and controller output
sucildossj Oct 21, 2025
23ea1f7
enable preconf mempool for testcase and include testcase for preconf
sucildossj Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions contrib/testgen/gen_key_io_test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,42 +62,42 @@
# templates for valid bech32 sequences
bech32_templates = [
# hrp, version, witprog_size, metadata, encoding, output_prefix
('bc', 0, 20, (False, 'main', None, True), Encoding.BECH32, p2wpkh_prefix),
('bc', 0, 32, (False, 'main', None, True), Encoding.BECH32, p2wsh_prefix),
('bc', 1, 32, (False, 'main', None, True), Encoding.BECH32M, p2tr_prefix),
('bc', 2, 2, (False, 'main', None, True), Encoding.BECH32M, (OP_2, 2)),
('tb', 0, 20, (False, 'test', None, True), Encoding.BECH32, p2wpkh_prefix),
('tb', 0, 32, (False, 'test', None, True), Encoding.BECH32, p2wsh_prefix),
('tb', 1, 32, (False, 'test', None, True), Encoding.BECH32M, p2tr_prefix),
('tb', 3, 16, (False, 'test', None, True), Encoding.BECH32M, (OP_3, 16)),
('tb', 0, 20, (False, 'signet', None, True), Encoding.BECH32, p2wpkh_prefix),
('tb', 0, 32, (False, 'signet', None, True), Encoding.BECH32, p2wsh_prefix),
('tb', 1, 32, (False, 'signet', None, True), Encoding.BECH32M, p2tr_prefix),
('tb', 3, 32, (False, 'signet', None, True), Encoding.BECH32M, (OP_3, 32)),
('bcrt', 0, 20, (False, 'regtest', None, True), Encoding.BECH32, p2wpkh_prefix),
('bcrt', 0, 32, (False, 'regtest', None, True), Encoding.BECH32, p2wsh_prefix),
('bcrt', 1, 32, (False, 'regtest', None, True), Encoding.BECH32M, p2tr_prefix),
('bcrt', 16, 40, (False, 'regtest', None, True), Encoding.BECH32M, (OP_16, 40))
('cc', 0, 20, (False, 'main', None, True), Encoding.BECH32, p2wpkh_prefix),
('cc', 0, 32, (False, 'main', None, True), Encoding.BECH32, p2wsh_prefix),
('cc', 1, 32, (False, 'main', None, True), Encoding.BECH32M, p2tr_prefix),
('cc', 2, 2, (False, 'main', None, True), Encoding.BECH32M, (OP_2, 2)),
('tc', 0, 20, (False, 'test', None, True), Encoding.BECH32, p2wpkh_prefix),
('tc', 0, 32, (False, 'test', None, True), Encoding.BECH32, p2wsh_prefix),
('tc', 1, 32, (False, 'test', None, True), Encoding.BECH32M, p2tr_prefix),
('tc', 3, 16, (False, 'test', None, True), Encoding.BECH32M, (OP_3, 16)),
('tc', 0, 20, (False, 'signet', None, True), Encoding.BECH32, p2wpkh_prefix),
('tc', 0, 32, (False, 'signet', None, True), Encoding.BECH32, p2wsh_prefix),
('tc', 1, 32, (False, 'signet', None, True), Encoding.BECH32M, p2tr_prefix),
('tc', 3, 32, (False, 'signet', None, True), Encoding.BECH32M, (OP_3, 32)),
('ccrt', 0, 20, (False, 'regtest', None, True), Encoding.BECH32, p2wpkh_prefix),
('ccrt', 0, 32, (False, 'regtest', None, True), Encoding.BECH32, p2wsh_prefix),
('ccrt', 1, 32, (False, 'regtest', None, True), Encoding.BECH32M, p2tr_prefix),
('ccrt', 16, 40, (False, 'regtest', None, True), Encoding.BECH32M, (OP_16, 40))
]
# templates for invalid bech32 sequences
bech32_ng_templates = [
# hrp, version, witprog_size, encoding, invalid_bech32, invalid_checksum, invalid_char
('tc', 0, 20, Encoding.BECH32, False, False, False),
('bt', 1, 32, Encoding.BECH32M, False, False, False),
('tb', 17, 32, Encoding.BECH32M, False, False, False),
('bcrt', 3, 1, Encoding.BECH32M, False, False, False),
('bc', 15, 41, Encoding.BECH32M, False, False, False),
('tb', 0, 16, Encoding.BECH32, False, False, False),
('bcrt', 0, 32, Encoding.BECH32, True, False, False),
('bc', 0, 16, Encoding.BECH32, True, False, False),
('tb', 0, 32, Encoding.BECH32, False, True, False),
('bcrt', 0, 20, Encoding.BECH32, False, False, True),
('bc', 0, 20, Encoding.BECH32M, False, False, False),
('tb', 0, 32, Encoding.BECH32M, False, False, False),
('bcrt', 0, 20, Encoding.BECH32M, False, False, False),
('bc', 1, 32, Encoding.BECH32, False, False, False),
('tb', 2, 16, Encoding.BECH32, False, False, False),
('bcrt', 16, 20, Encoding.BECH32, False, False, False),
('cc', 0, 20, Encoding.BECH32, False, False, False),
('ct', 1, 32, Encoding.BECH32M, False, False, False),
('tc', 17, 32, Encoding.BECH32M, False, False, False),
('ccrt', 3, 1, Encoding.BECH32M, False, False, False),
('cc', 15, 41, Encoding.BECH32M, False, False, False),
('tc', 0, 16, Encoding.BECH32, False, False, False),
('ccrt', 0, 32, Encoding.BECH32, True, False, False),
('cc', 0, 16, Encoding.BECH32, True, False, False),
('tc', 0, 32, Encoding.BECH32, False, True, False),
('ccrt', 0, 20, Encoding.BECH32, False, False, True),
('cc', 0, 20, Encoding.BECH32M, False, False, False),
('tc', 0, 32, Encoding.BECH32M, False, False, False),
('ccrt', 0, 20, Encoding.BECH32M, False, False, False),
('cc', 1, 32, Encoding.BECH32, False, False, False),
('tc', 2, 16, Encoding.BECH32, False, False, False),
('ccrt', 16, 20, Encoding.BECH32, False, False, False),
]

def is_valid(v):
Expand All @@ -119,7 +119,7 @@ def is_valid(v):

def is_valid_bech32(v):
'''Check vector v for bech32 validity'''
for hrp in ['bc', 'tb', 'bcrt']:
for hrp in ['cc', 'tc', 'ccrt']:
if decode_segwit_address(hrp, v) != (None, None):
return True
return False
Expand Down
140 changes: 140 additions & 0 deletions generate_blockfilters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
#!/usr/bin/env python3
"""
Generate blockfilters.json.h from custom block data
Usage: python3 generate_blockfilters.py <block_hex> > blockfilters.json.h
"""

import sys
import json

def hex_to_c_array(hex_string):
"""Convert hex string to C-style byte array"""
# Remove any whitespace or prefixes
hex_string = hex_string.replace('0x', '').replace(' ', '').replace('\n', '')

# Convert to bytes
if len(hex_string) % 2 != 0:
raise ValueError("Hex string must have even length")

bytes_data = bytes.fromhex(hex_string)

# Format as C array
c_array = []
for i, byte in enumerate(bytes_data):
c_array.append(f"'\\x{byte:02x}'")

return c_array

def format_c_array_lines(c_array, indent=4):
"""Format C array into lines of reasonable length"""
lines = []
current_line = " " * indent

for i, item in enumerate(c_array):
if i > 0:
current_line += ", "

# Start new line if current line is getting too long
if len(current_line) > 70 and i > 0:
lines.append(current_line.rstrip(", "))
current_line = " " * indent

current_line += item

if current_line.strip():
lines.append(current_line)

return ",\n".join(lines)

def generate_blockfilters_header(block_hex, block_height=0, block_hash=None,
prev_basic_header=None, basic_filter=None,
basic_header=None, notes="Custom block"):
"""Generate the complete blockfilters.json.h file"""

# Default values if not provided
if block_hash is None:
block_hash = "0" * 64
if prev_basic_header is None:
prev_basic_header = "0" * 64
if basic_filter is None:
basic_filter = "0150ac20"
if basic_header is None:
basic_header = "cd6ff3436ab73a37671e2232b42c8bce4c5597112d736e88555effd3aabcc526"

# Create block filter test entry matching the exact format
test_data = [
[
"Block Height,Block Hash,Block,[Prev Output Scripts for Block],Previous Basic Header,Basic Filter,Basic Header,Notes"
],
[
block_height,
block_hash,
block_hex,
[], # Previous output scripts
prev_basic_header,
basic_filter,
basic_header,
notes
]
]

# Convert to JSON with proper formatting
json_string = json.dumps(test_data, separators=(',', ','))

# Convert JSON string to C array
c_array = hex_to_c_array(json_string.encode('utf-8').hex())

# Generate header
header = """// Copyright (c) 2019-2024 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_TEST_DATA_BLOCKFILTERS_JSON_H
#define BITCOIN_TEST_DATA_BLOCKFILTERS_JSON_H

namespace json_tests {
static const char *blockfilters_json =
"""

footer = """;
} // namespace json_tests

#endif // BITCOIN_TEST_DATA_BLOCKFILTERS_JSON_H
"""

# Format the C array with proper indentation
formatted_array = format_c_array_lines(c_array)

return header + formatted_array + footer

def main():
if len(sys.argv) < 2:
print("Usage: python3 generate_blockfilters.py <block_hex> [height] [hash] [prev_header] [filter] [header] [notes]", file=sys.stderr)
print("Example: python3 generate_blockfilters.py 0100000000000000... 0 > blockfilters.json.h", file=sys.stderr)
print("\nAll parameters after block_hex are optional:", file=sys.stderr)
print(" height: Block height (default: 0)", file=sys.stderr)
print(" hash: Block hash (default: all zeros)", file=sys.stderr)
print(" prev_header: Previous basic header (default: all zeros)", file=sys.stderr)
print(" filter: Basic filter hex (default: 0150ac20)", file=sys.stderr)
print(" header: Basic header hash (default: genesis hash)", file=sys.stderr)
print(" notes: Description (default: 'Custom block')", file=sys.stderr)
sys.exit(1)

block_hex = sys.argv[1]

# Optional parameters
block_height = int(sys.argv[2]) if len(sys.argv) > 2 else 0
block_hash = sys.argv[3] if len(sys.argv) > 3 else None
prev_basic_header = sys.argv[4] if len(sys.argv) > 4 else None
basic_filter = sys.argv[5] if len(sys.argv) > 5 else None
basic_header = sys.argv[6] if len(sys.argv) > 6 else None
notes = sys.argv[7] if len(sys.argv) > 7 else "Custom block"

output = generate_blockfilters_header(
block_hex, block_height, block_hash,
prev_basic_header, basic_filter, basic_header, notes
)
print(output)

if __name__ == "__main__":
main()
20 changes: 10 additions & 10 deletions src/coins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void CCoinsViewCache::EmplaceCoinInternalDANGER(COutPoint&& outpoint, Coin&& coi
if (inserted) CCoinsCacheEntry::SetDirty(*it, m_sentinel);
}

void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const CAmount preconfRefund, uint32_t nAssetID, const CAmount amountAssetIn, int nControlN, uint32_t nNewAssetID, bool check_for_overwrite)
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const CAmount preconfRefund, std::vector<unsigned char> nAssetID, const CAmount amountAssetIn, int nControlN, std::vector<unsigned char> nNewAssetID, bool check_for_overwrite)
{
bool fCoinbase = tx.IsCoinBase();
const Txid& txid = tx.GetHash();
Expand All @@ -130,7 +130,7 @@ void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const
DataStream stream(stack[2]);
CAmount value;
stream >> value;
cache.AddCoin(tx.vin[0].prevout, Coin(CTxOut(value, CScript(stack[0].begin(), stack[0].end())), nHeight, fCoinbase, false, false, false, true, 0), false);
cache.AddCoin(tx.vin[0].prevout, Coin(CTxOut(value, CScript(stack[0].begin(), stack[0].end())), nHeight, fCoinbase, false, false, false, true, std::vector<unsigned char>{}), false);
}

if (amountAssetIn > 0) {
Expand All @@ -139,7 +139,7 @@ void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const
if (tx.version == TRANSACTION_PRECONF_VERSION && !tx.IsCoinBase()) {
bool overwrite = check_for_overwrite ? cache.HaveCoin(COutPoint(txid, 0)) : fCoinbase;
CTxOut refund(preconfRefund, tx.vout[0].scriptPubKey);
cache.AddCoin(COutPoint(txid, 0), Coin(refund, nHeight, fCoinbase, false, false, true, false, 0), overwrite);
cache.AddCoin(COutPoint(txid, 0), Coin(refund, nHeight, fCoinbase, false, false, true, false, std::vector<unsigned char>{}), overwrite);
}

// Label BitAsset outputs until we account for all BitAsset input
Expand All @@ -149,8 +149,8 @@ void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const
bool overwrite = check_for_overwrite ? cache.HaveCoin(COutPoint(txid, i)) : fCoinbase;
bool fAsset = amountAssetIn > amountAssetOut;
bool fControl = nControlN >= 0 && (int)i == nControlN;
uint32_t nID = nNewAssetID ? nNewAssetID : nAssetID;
cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : 0), overwrite);
std::vector<unsigned char> nID = !nNewAssetID.empty() ? nNewAssetID : nAssetID;
cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : std::vector<unsigned char>{}), overwrite);
if (fAsset)
amountAssetOut += tx.vout[i].nValue;
}
Expand All @@ -163,19 +163,19 @@ void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight, const
for (size_t i = 0; i < tx.vout.size(); ++i) {
bool fAsset = fNewAsset && i < 2;
bool fControl = fNewAsset && i == 0;
uint32_t nID = nNewAssetID ? nNewAssetID : nAssetID;
std::vector<unsigned char> nID = !nNewAssetID.empty() ? nNewAssetID : nAssetID;
bool overwrite = check_for_overwrite ? cache.HaveCoin(COutPoint(txid, i)) : fCoinbase;
if (tx.version == TRANSACTION_PRECONF_VERSION && i == 0 && !tx.IsCoinBase()) {
CTxOut refund(preconfRefund, tx.vout[i].scriptPubKey);
cache.AddCoin(COutPoint(txid, i), Coin(refund, nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : 0), overwrite);
cache.AddCoin(COutPoint(txid, i), Coin(refund, nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : std::vector<unsigned char>{}), overwrite);
} else {
cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : 0), overwrite);
cache.AddCoin(COutPoint(txid, i), Coin(tx.vout[i], nHeight, fCoinbase, fAsset, fControl, tx.version == TRANSACTION_PRECONF_VERSION ? true : false, false, fAsset ? nID : std::vector<unsigned char>{}), overwrite);
}
}
}
}

bool CCoinsViewCache::SpendCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, bool& isPreconf, uint32_t& nAssetID, Coin* moveout)
bool CCoinsViewCache::SpendCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, bool& isPreconf, std::vector<unsigned char>& nAssetID, Coin* moveout)
{
CCoinsMap::iterator it = FetchCoin(outpoint);
if (it == cacheCoins.end()) return false;
Expand All @@ -202,7 +202,7 @@ bool CCoinsViewCache::SpendCoin(const COutPoint& outpoint, bool& fBitAsset, bool
return true;
}

bool CCoinsViewCache::getAssetCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, uint32_t& nAssetID, Coin* moveout)
bool CCoinsViewCache::getAssetCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, std::vector<unsigned char>& nAssetID, Coin* moveout)
{
CCoinsMap::iterator it = FetchCoin(outpoint);
if (it == cacheCoins.end()) return false;
Expand Down
18 changes: 9 additions & 9 deletions src/coins.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ class Coin
//! Is this a pegin transaction
bool isPegin;

uint32_t nAssetID;
std::vector<unsigned char> nAssetID;


//! construct a Coin from a CTxOut and height/coinbase information.
Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn, bool fBitAssetIn = false, bool fBitAssetControlIn = false, bool isPreconfIn = false, bool isPeginIn = false, uint32_t nAssetIDIn = 0) : out(std::move(outIn)), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), fBitAsset(fBitAssetIn), fBitAssetControl(fBitAssetControlIn), isPreconf(isPreconfIn), isPegin(isPeginIn), nAssetID(nAssetIDIn) {}
Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn, bool fBitAssetIn = false, bool fBitAssetControlIn = false, bool isPreconfIn = false, bool isPeginIn = false, uint32_t nAssetIDIn = 0) : out(outIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), fBitAsset(fBitAssetIn), fBitAssetControl(fBitAssetControlIn), isPreconf(isPreconfIn), isPegin(isPeginIn), nAssetID(nAssetIDIn) {}
Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn, bool fBitAssetIn = false, bool fBitAssetControlIn = false, bool isPreconfIn = false, bool isPeginIn = false, std::vector<unsigned char> nAssetIDIn = {}) : out(std::move(outIn)), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), fBitAsset(fBitAssetIn), fBitAssetControl(fBitAssetControlIn), isPreconf(isPreconfIn), isPegin(isPeginIn), nAssetID(nAssetIDIn) {}
Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn, bool fBitAssetIn = false, bool fBitAssetControlIn = false, bool isPreconfIn = false, bool isPeginIn = false, std::vector<unsigned char> nAssetIDIn = {}) : out(outIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), fBitAsset(fBitAssetIn), fBitAssetControl(fBitAssetControlIn), isPreconf(isPreconfIn), isPegin(isPeginIn), nAssetID(nAssetIDIn) {}

void Clear()
{
Expand All @@ -71,11 +71,11 @@ class Coin
fBitAssetControl = false;
isPreconf = false;
isPegin = false;
nAssetID = 0;
nAssetID.clear();
}

//! empty constructor
Coin() : fCoinBase(false), nHeight(0), fBitAsset(false), fBitAssetControl(false), isPreconf(false), isPegin(false), nAssetID(0) {}
Coin() : fCoinBase(false), nHeight(0), fBitAsset(false), fBitAssetControl(false), isPreconf(false), isPegin(false), nAssetID({}) {}


bool IsCoinBase() const
Expand Down Expand Up @@ -103,7 +103,7 @@ class Coin
return isPegin;
}

uint32_t GetAssetID() const
std::vector<unsigned char> GetAssetID() const
{
return nAssetID;
}
Expand Down Expand Up @@ -500,14 +500,14 @@ class CCoinsViewCache : public CCoinsViewBacked
* If no unspent output exists for the passed outpoint, this call
* has no effect.
*/
bool SpendCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, bool& isPreconf, uint32_t& nAssetID, Coin* moveto = nullptr);
bool SpendCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, bool& isPreconf, std::vector<unsigned char>& nAssetID, Coin* moveto = nullptr);

/**
* get asset coin. Pass moveto in order to get the deleted data.
* If no unspent output exists for the passed outpoint, this call
* has no effect.
*/
bool getAssetCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, uint32_t& nAssetID, Coin* moveto = nullptr);
bool getAssetCoin(const COutPoint& outpoint, bool& fBitAsset, bool& fBitAssetControl, std::vector<unsigned char>& nAssetID, Coin* moveto = nullptr);

bool isPeginSpent(const COutPoint& outpoint) const;

Expand Down Expand Up @@ -567,7 +567,7 @@ class CCoinsViewCache : public CCoinsViewBacked
//! an overwrite.
// TODO: pass in a boolean to limit these possible overwrites to known
// (pre-BIP34) cases.
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight = 0, const CAmount preconfRefund = CAmount(0), uint32_t nAssetID = 0, const CAmount amountAssetIn = 0, int nControlN = -1, uint32_t nNewAssetID = 0, bool check = false);
void AddCoins(CCoinsViewCache& cache, const CTransaction& tx, int nHeight = 0, const CAmount preconfRefund = CAmount(0), std::vector<unsigned char> nAssetID = {}, const CAmount amountAssetIn = 0, int nControlN = -1, std::vector<unsigned char> nNewAssetID = {}, bool check = false);

//! Utility function to find any unspent output with a given txid.
//! This function can be quite expensive because in the event of a transaction
Expand Down
Loading