Skip to content

Commit

Permalink
Merge branch 'master' into v12.2.5PRBR4
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoCentric authored Mar 24, 2019
2 parents b695960 + 12b7f2a commit 2a02b45
Show file tree
Hide file tree
Showing 23 changed files with 42 additions and 48 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Absolute 0.12.2.5a
# Absolute 0.12.2.5a

Absolute (ABS) is a digital currency inspired by solutions first used in Dash.

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
1 change: 0 additions & 1 deletion qa/rpc-tests/bip68-112-113-p2p.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ def get_tests(self):
# BIP113 test transaction will be modified before each use to put in appropriate block time
bip113tx_v1 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("499.98"))
bip113tx_v1.vin[0].nSequence = 0xFFFFFFFE
bip113tx_v1.nVersion = 1
bip113tx_v2 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("499.98"))
bip113tx_v2.vin[0].nSequence = 0xFFFFFFFE
bip113tx_v2.nVersion = 2
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/mempool_reorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run_test(self):
# Create a block-height-locked transaction which will be invalid after reorg
timelock_tx = self.nodes[0].createrawtransaction([{"txid": coinbase_txids[0], "vout": 0}], {node0_address: 500})
# Set the time lock
timelock_tx = timelock_tx.replace("ffffffff", "11111191", 1)
timelock_tx = timelock_tx.replace("ffffffff", "11111111", 1)
timelock_tx = timelock_tx[:-8] + hex(self.nodes[0].getblockcount() + 2)[2:] + "000000"
timelock_tx = self.nodes[0].signrawtransaction(timelock_tx)["hex"]
assert_raises(JSONRPCException, self.nodes[0].sendrawtransaction, timelock_tx)
Expand Down
2 changes: 2 additions & 0 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#define CLIENT_VERSION_BUILD 5

//! Set to true for release, false for prerelease or test build

#define CLIENT_VERSION_IS_RELEASE true

/**
* Copyright year (2009-this)
* Todo: update this when changing our copyright comments in the source
Expand Down
2 changes: 1 addition & 1 deletion src/primitives/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class CTransaction
{
public:
// Default transaction version.
static const int32_t CURRENT_VERSION=2;
static const int32_t CURRENT_VERSION=1;

// Changing the default transaction version requires a two step process: first
// adapting relay policy by bumping MAX_STANDARD_VERSION, and then later date
Expand Down
23 changes: 15 additions & 8 deletions src/test/data/bitcoin-util-test.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
[
{ "exec": "./absolute-tx",
"args": ["-create", "nversion=1"],
"output_cmp": "blanktxv1.hex",
"description": "Creates a blank v1 transaction"
"args": ["-create"],
"output_cmp": "blanktx.hex",
"description": "Creates a blank transaction"
},
{ "exec": "./absolute-tx",
"args": ["-json","-create"],

"output_cmp": "blanktxv2.json",
"description": "Creates a blank transaction (output in json)"
},
{ "exec": "./absolute-tx",
"args": ["-"],

"input": "blanktxv2.hex",
"output_cmp": "blanktxv2.hex",

"description": "Creates a blank transaction when nothing is piped into bitcoin-tx"
},
{ "exec": "./absolute-tx",
"args": ["-json","-"],

"input": "blanktxv2.hex",
"output_cmp": "blanktxv2.json",

"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)"
},
{ "exec": "./absolute-tx",
Expand Down Expand Up @@ -142,25 +147,27 @@
"description": "Parses a transation with no inputs and a single output script"
},
{ "exec": "./absolute-tx",
"args": ["-json", "02000000000100000000000000000000000000"],
"args": ["-json", "01000000000100000000000000000000000000"],
"output_cmp": "txcreate2.json",
"description": "Parses a transation with no inputs and a single output script (output in json)"
},
{ "exec": "./absolute-tx",
"args":
["-create", "nversion=1",
["-create",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
"sign=ALL",

"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
"output_cmp": "txcreatesignv1.hex",
"description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"

},
{ "exec": "./absolute-tx",
"args":
["-json",
"-create", "nversion=1",
"-create",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
Expand Down Expand Up @@ -222,12 +229,12 @@
{ "exec": "./absolute-tx",
"args":
["-json",
"-create", "nversion=1",
"-create",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
"outaddr=0.18:Xdak8YsJz8tm1iHFmycfTyKeUvHgfbdpyw",
"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
"output_cmp": "txcreatedata1.json",
"description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
"description": "Creates a new transaction with one input, one address output and one data output (output in json)"
},
{ "exec": "./absolute-tx",
"args":
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/test/data/blanktxv2.hex

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/data/txcreate1.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000
01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000
6 changes: 3 additions & 3 deletions src/test/data/txcreate1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"txid": "fe7d174f42dce0cffa7a527e9bc8368956057619ec817648f6138b98f2533e8f",
"version": 2,
"txid": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231",
"version": 1,
"locktime": 0,
"vin": [
{
Expand Down Expand Up @@ -59,5 +59,5 @@
}
}
],
"hex": "02000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000"
"hex": "01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000"
}
2 changes: 1 addition & 1 deletion src/test/data/txcreate2.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02000000000100000000000000000000000000
01000000000100000000000000000000000000
6 changes: 3 additions & 3 deletions src/test/data/txcreate2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"txid": "0481afb29931341d0d7861d8a2f6f26456fa042abf54a23e96440ed7946e0715",
"version": 2,
"txid": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13",
"version": 1,
"locktime": 0,
"vin": [
],
Expand All @@ -15,5 +15,5 @@
}
}
],
"hex": "02000000000100000000000000000000000000"
"hex": "01000000000100000000000000000000000000"
}
2 changes: 1 addition & 1 deletion src/test/data/txcreatedata1.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac0084d71700000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac0084d71700000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
2 changes: 1 addition & 1 deletion src/test/data/txcreatedata2.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
6 changes: 3 additions & 3 deletions src/test/data/txcreatedata2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"txid": "c14b007fa3a6c1e7765919c1d14c1cfc2b8642c3a5d3be4b1fa8c4ccfec98bb0",
"version": 2,
"txid": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b",
"version": 1,
"locktime": 0,
"vin": [
{
Expand Down Expand Up @@ -37,5 +37,5 @@
}
}
],
"hex": "02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000"
"hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000"
}
2 changes: 1 addition & 1 deletion src/test/data/txcreatedata_seq0.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000
01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000
6 changes: 3 additions & 3 deletions src/test/data/txcreatedata_seq0.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"txid": "8df6ed527472542dd5e137c242a7c5a9f337ac34f7b257ae4af886aeaebb51b0",
"version": 2,
"txid": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8",
"version": 1,
"locktime": 0,
"vin": [
{
Expand Down Expand Up @@ -28,5 +28,5 @@
}
}
],
"hex": "02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000"
"hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000"
}
File renamed without changes.
1 change: 0 additions & 1 deletion src/test/data/txcreatesignv2.hex

This file was deleted.

7 changes: 2 additions & 5 deletions src/test/hash_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,8 @@ BOOST_AUTO_TEST_CASE(siphash)
}

CHashWriter ss(SER_DISK, CLIENT_VERSION);
CMutableTransaction tx;
// Note these tests were originally written with tx.nVersion=1
// and the test would be affected by default tx version bumps if not fixed.
tx.nVersion = 1;
ss << tx;
ss << CTransaction();
BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL);

// Check consistency between CSipHasher and SipHashUint256[Extra].
// TODO reenable when backporting Bitcoin #10321
Expand Down
13 changes: 2 additions & 11 deletions src/test/mempool_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)

pool.addUnchecked(tx6.GetHash(), entry.Fee(0LL).FromTx(tx6));
BOOST_CHECK_EQUAL(pool.size(), 6);
// Ties are broken by hash
if (tx3.GetHash() < tx6.GetHash())
sortedOrder.push_back(tx6.GetHash().ToString());
else
sortedOrder.insert(sortedOrder.end()-1,tx6.GetHash().ToString());

sortedOrder.push_back(tx6.GetHash().ToString());
CheckSort<ancestor_score>(pool, sortedOrder);

CMutableTransaction tx7 = CMutableTransaction();
Expand All @@ -419,11 +414,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
pool.removeForBlock(vtx, 1);

sortedOrder.erase(sortedOrder.begin()+1);
// Ties are broken by hash
if (tx3.GetHash() < tx6.GetHash())
sortedOrder.pop_back();
else
sortedOrder.erase(sortedOrder.end()-2);
sortedOrder.pop_back();
sortedOrder.insert(sortedOrder.begin(), tx7.GetHash().ToString());
CheckSort<ancestor_score>(pool, sortedOrder);
}
Expand Down
1 change: 0 additions & 1 deletion src/test/txvalidationcache_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
spends.resize(2);
for (int i = 0; i < 2; i++)
{
spends[i].nVersion = 1;
spends[i].vin.resize(1);
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
spends[i].vin[0].prevout.n = 0;
Expand Down

0 comments on commit 2a02b45

Please sign in to comment.