Skip to content

Commit 0e94e97

Browse files
authored
Add missing tx type to TxToUniv (#3069)
* Add missing tx `type` to `TxToUniv` * Adjust the expected output in unit test testcases accordingly
1 parent becca24 commit 0e94e97

18 files changed

+18
-0
lines changed

src/core_write.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
164164
uint256 txid = tx.GetHash();
165165
entry.pushKV("txid", txid.GetHex());
166166
entry.pushKV("version", tx.nVersion);
167+
entry.pushKV("type", tx.nType);
167168
entry.pushKV("size", (int)::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION));
168169
entry.pushKV("locktime", (int64_t)tx.nLockTime);
169170

test/util/data/blanktxv1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "d21633ba23f70118185227be58a63527675641ad37967e2aa461559f577aec43",
33
"version": 1,
4+
"type": 0,
45
"size": 10,
56
"locktime": 0,
67
"vin": [

test/util/data/blanktxv2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "4ebd325a4b394cff8c57e8317ccf5a8d0e2bdf1b8526f8aad6c8e43d8240621a",
33
"version": 2,
4+
"type": 0,
45
"size": 10,
56
"locktime": 0,
67
"vin": [

test/util/data/tt-delin1-out.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "81b2035be1da1abe745c6141174a73d151009ec17b3d5ebffa2e177408c50dfd",
33
"version": 1,
4+
"type": 0,
45
"size": 3040,
56
"locktime": 0,
67
"vin": [

test/util/data/tt-delout1-out.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "c46ccd75b5050e942b2e86a3648f843f525fe6fc000bf0534ba5973063354493",
33
"version": 1,
4+
"type": 0,
45
"size": 3155,
56
"locktime": 0,
67
"vin": [

test/util/data/tt-locktime317000-out.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "aded538f642c17e15f4d3306b8be7e1a4d1ae0c4616d641ab51ea09ba65e5cb5",
33
"version": 1,
4+
"type": 0,
45
"size": 3189,
56
"locktime": 317000,
67
"vin": [

test/util/data/txcreate1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "fe7d174f42dce0cffa7a527e9bc8368956057619ec817648f6138b98f2533e8f",
33
"version": 2,
4+
"type": 0,
45
"size": 201,
56
"locktime": 0,
67
"vin": [

test/util/data/txcreate2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "0481afb29931341d0d7861d8a2f6f26456fa042abf54a23e96440ed7946e0715",
33
"version": 2,
4+
"type": 0,
45
"size": 19,
56
"locktime": 0,
67
"vin": [

test/util/data/txcreatedata1.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "07894b4d12fe7853dd911402db1620920d261b9627c447f931417d330c25f06e",
33
"version": 1,
4+
"type": 0,
45
"size": 176,
56
"locktime": 0,
67
"vin": [

test/util/data/txcreatedata2.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"txid": "c14b007fa3a6c1e7765919c1d14c1cfc2b8642c3a5d3be4b1fa8c4ccfec98bb0",
33
"version": 2,
4+
"type": 0,
45
"size": 176,
56
"locktime": 0,
67
"vin": [

0 commit comments

Comments
 (0)