Skip to content

Commit

Permalink
Merge branch 'develop' into 27.x
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed May 30, 2024
2 parents e07d846 + 353efd3 commit 7aa9724
Show file tree
Hide file tree
Showing 124 changed files with 739 additions and 459 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v26.1.0-beta-1 (2024-05-24)
- Updated to Bitcoin Core 26.1
- Create V2 transactions by default
- Disconnect from peers older than version 70015
- Increased `DUST_RELAY_TX_FEE` and `DEFAULT_MIN_RELAY_TX_FEE` to 100000
- Eliminated segfault occurring after a power outage
- Enabled V2 P2P transport by default (backport of Core's PR29347 and 29058)
- Enabled `checkkernel` RPC call
- Only delete the PID file if we created it (backport of Core's PR28946)
- Set minimum UTXO value to be used for staking to 0.1 BLK (can be overridden with `-minstakingamount` parameter)

## v26.0.0-beta-1 (2024-02-12)
- Updated to Bitcoin Core 26.0
- Fixed a bug that prevented adding more inputs in the coinstake transaction for legacy wallets
Expand Down Expand Up @@ -37,6 +48,11 @@
## v22.1.0-alpha-1 (2023-01-20)
- Updated to Bitcoin Core 22.1

## v13.2.3 (2024-05-18)
- Create V2 transactions by default
- Disconnect from peers older than version 70015
- Increased `DEFAULT_MIN_RELAY_TX_FEE` to 100000

## v13.2.2 (2024-01-24)
- Set mainnet hard fork date to April 24, 2024
- Adjusted minimum fee calculations
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://blackcoinmore.org
What is Blackcoin?
----------------

Blackcoin is a decentralised digital currency with near-instant transaction speeds and negligible transaction fees built upon Proof of Stake 3.0 (PoSV3, BPoS) as introduced by the Blackcoin development team.
Blackcoin is a decentralised digital currency with near-instant transaction speeds and negligible transaction fees built upon Proof of Stake 3.1 (PoSV3, BPoS) as introduced by the Blackcoin development team.

What is Blackcoin More?
----------------
Expand Down Expand Up @@ -92,8 +92,5 @@ However, it may contain experimental features and should be used with caution.
### 13.2
The release branch for Blackcoin More 13.2.x. It is intended to contain stable and functional code that has been thoroughly tested and reviewed.

### 25.x
The release branch for Blackcoin More 25.x. Contains functional but experimental code.

### 26.x
The release branch for Blackcoin More 26.x. Contains functional but highly experimental code.
7 changes: 6 additions & 1 deletion contrib/seeds/nodes_main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
216.39.250.91:15714
172.99.189.198:15714
50.47.255.100:15714
95.217.78.81:15714


# IPv6 nodes
Expand All @@ -37,6 +36,12 @@
[2a02:c207:2110:9259::1]:15714
[2a10:3781:525:1::210]:15714
[2a10:3781:525:1::201]:15714
[2a10:3781:525:1::210]:15714
[2a10:3781:525:1::201]:15714
[2a10:3781:525:1::211]:15714
[2a10:3781:525:1::212]:15714
[2a10:3781:525:1::213]:15714
[2a10:3781:525:1::215]:15714
[2a10:3781:525:6::10]:15714
[2a10:3781:525:6::11]:15714
[2602:fec3:2:10::9:91]:15714
Expand Down
4 changes: 4 additions & 0 deletions contrib/seeds/nodes_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
[2a02:c207:2110:9259::1]:25714
[2a10:3781:525:1::210]:25714
[2a10:3781:525:1::201]:25714
[2a10:3781:525:1::211]:25714
[2a10:3781:525:1::212]:25714
[2a10:3781:525:1::213]:25714
[2a10:3781:525:1::215]:25714
[2a10:3781:525:6::10]:25714
[2a10:3781:525:6::11]:25714

Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmore-cli.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORE-CLI "1" "February 2024" "blackmore-cli v26.0.0" "User Commands"
.TH BLACKMORE-CLI "1" "April 2024" "blackmore-cli v26.1.0" "User Commands"
.SH NAME
blackmore-cli \- manual page for blackmore-cli v26.0.0
blackmore-cli \- manual page for blackmore-cli v26.1.0
.SH SYNOPSIS
.B blackmore-cli
[\fI\,options\/\fR] \fI\,<command> \/\fR[\fI\,params\/\fR] \fI\,Send command to Blackcoin More\/\fR
Expand All @@ -15,7 +15,7 @@ blackmore-cli \- manual page for blackmore-cli v26.0.0
.B blackmore-cli
[\fI\,options\/\fR] \fI\,help <command> Get help for a command\/\fR
.SH DESCRIPTION
Blackcoin More RPC client version v26.0.0
Blackcoin More RPC client version v26.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmore-qt.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORE-QT "1" "February 2024" "blackmore-qt v26.0.0" "User Commands"
.TH BLACKMORE-QT "1" "April 2024" "blackmore-qt v26.1.0" "User Commands"
.SH NAME
blackmore-qt \- manual page for blackmore-qt v26.0.0
blackmore-qt \- manual page for blackmore-qt v26.1.0
.SH SYNOPSIS
.B blackmore-qt
[\fI\,command-line options\/\fR]
.SH DESCRIPTION
Blackcoin More version v26.0.0
Blackcoin More version v26.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmore-tx.1
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORE-TX "1" "February 2024" "blackmore-tx v26.0.0" "User Commands"
.TH BLACKMORE-TX "1" "April 2024" "blackmore-tx v26.1.0" "User Commands"
.SH NAME
blackmore-tx \- manual page for blackmore-tx v26.0.0
blackmore-tx \- manual page for blackmore-tx v26.1.0
.SH SYNOPSIS
.B blackmore-tx
[\fI\,options\/\fR] \fI\,<hex-tx> \/\fR[\fI\,commands\/\fR] \fI\,Update hex-encoded blackcoin transaction\/\fR
.br
.B blackmore-tx
[\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] \fI\,Create hex-encoded blackcoin transaction\/\fR
.SH DESCRIPTION
Blackcoin More blackmore\-tx utility version v26.0.0
Blackcoin More blackmore\-tx utility version v26.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmore-util.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORE-UTIL "1" "February 2024" "blackmore-util v26.0.0" "User Commands"
.TH BLACKMORE-UTIL "1" "April 2024" "blackmore-util v26.1.0" "User Commands"
.SH NAME
blackmore-util \- manual page for blackmore-util v26.0.0
blackmore-util \- manual page for blackmore-util v26.1.0
.SH SYNOPSIS
.B blackmore-util
[\fI\,options\/\fR] [\fI\,commands\/\fR] \fI\,Do stuff\/\fR
.SH DESCRIPTION
Blackcoin More blackmore\-util utility version v26.0.0
Blackcoin More blackmore\-util utility version v26.1.0
.SH OPTIONS
.HP
\-?
Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmore-wallet.1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORE-WALLET "1" "February 2024" "blackmore-wallet v26.0.0" "User Commands"
.TH BLACKMORE-WALLET "1" "April 2024" "blackmore-wallet v26.1.0" "User Commands"
.SH NAME
blackmore-wallet \- manual page for blackmore-wallet v26.0.0
blackmore-wallet \- manual page for blackmore-wallet v26.1.0
.SH DESCRIPTION
Blackcoin More blackmore\-wallet version v26.0.0
Blackcoin More blackmore\-wallet version v26.1.0
.PP
blackmore\-wallet is an offline tool for creating and interacting with Blackcoin More wallet files.
By default blackmore\-wallet will act on wallets in the default mainnet wallet directory in the datadir.
Expand Down
6 changes: 3 additions & 3 deletions doc/man/blackmored.1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.1.
.TH BLACKMORED "1" "February 2024" "blackmored v26.0.0" "User Commands"
.TH BLACKMORED "1" "April 2024" "blackmored v26.1.0" "User Commands"
.SH NAME
blackmored \- manual page for blackmored v26.0.0
blackmored \- manual page for blackmored v26.1.0
.SH SYNOPSIS
.B blackmored
[\fI\,options\/\fR] \fI\,Start Blackcoin More\/\fR
.SH DESCRIPTION
Blackcoin More version v26.0.0
Blackcoin More version v26.1.0
.SH OPTIONS
.HP
\-?
Expand Down
4 changes: 2 additions & 2 deletions src/addrdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool SerializeFileDB(const std::string& prefix, const fs::path& path, const Data
// open temp output file
fs::path pathTmp = gArgs.GetDataDirNet() / fs::u8path(tmpfn);
FILE *file = fsbridge::fopen(pathTmp, "wb");
AutoFile fileout{file};
CAutoFile fileout{file};
if (fileout.IsNull()) {
fileout.fclose();
remove(pathTmp);
Expand Down Expand Up @@ -118,7 +118,7 @@ template <typename Data>
void DeserializeFileDB(const fs::path& path, Data&& data)
{
FILE* file = fsbridge::fopen(path, "rb");
AutoFile filein{file};
CAutoFile filein{file};
if (filein.IsNull()) {
throw DbNotFoundError{};
}
Expand Down
4 changes: 2 additions & 2 deletions src/bench/checkblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

static void DeserializeBlockTest(benchmark::Bench& bench)
{
DataStream stream(benchmark::data::block413567);
CDataStream stream(benchmark::data::block413567, SER_NETWORK);
std::byte a{0};
stream.write({&a, 1}); // Prevent compaction

Expand All @@ -33,7 +33,7 @@ static void DeserializeBlockTest(benchmark::Bench& bench)

static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
{
DataStream stream(benchmark::data::block413567);
CDataStream stream(benchmark::data::block413567, SER_NETWORK);
std::byte a{0};
stream.write({&a, 1}); // Prevent compaction

Expand Down
2 changes: 1 addition & 1 deletion src/bench/load_external.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void LoadExternalBlockFile(benchmark::Bench& bench)
bench.run([&] {
// "rb" is "binary, O_RDONLY", positioned to the start of the file.
// The file will be closed by LoadExternalBlockFile().
AutoFile file{fsbridge::fopen(blkfile, "rb")};
CAutoFile file{fsbridge::fopen(blkfile, "rb")};
testing_setup->m_node.chainman->LoadExternalBlockFile(file, &pos, &blocks_with_unknown_parent);
});
fs::remove(blkfile);
Expand Down
2 changes: 1 addition & 1 deletion src/bench/readblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

static FlatFilePos WriteBlockToDisk(ChainstateManager& chainman)
{
DataStream stream{benchmark::data::block413567};
CDataStream stream{benchmark::data::block413567, SER_NETWORK};
CBlock block;
stream >> TX_WITH_WITNESS(block);

Expand Down
2 changes: 1 addition & 1 deletion src/bench/rpc_blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct TestBlockAndIndex {

TestBlockAndIndex()
{
DataStream stream{benchmark::data::block413567};
CDataStream stream(benchmark::data::block413567, SER_NETWORK);
std::byte a{0};
stream.write({&a, 1}); // Prevent compaction

Expand Down
3 changes: 1 addition & 2 deletions src/bench/streams_findbyte.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include <streams.h>
#include <util/fs.h>
#include <version.h> // for PROTOCOL_VERSION

#include <cstddef>
#include <cstdint>
Expand All @@ -15,7 +14,7 @@
static void FindByte(benchmark::Bench& bench)
{
// Setup
AutoFile file{fsbridge::fopen("streams_tmp", "w+b")};
CAutoFile file{fsbridge::fopen("streams_tmp", "w+b"), 0};
const size_t file_size = 200;
uint8_t data[file_size] = {0};
data[file_size-1] = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/bench/verify_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void VerifyScriptBench(benchmark::Bench& bench)
assert(success);

#if defined(HAVE_CONSENSUS_LIB)
DataStream stream;
CDataStream stream(SER_NETWORK);
stream << TX_WITH_WITNESS(txSpend);
int csuccess = bitcoinconsensus_verify_script_with_amount(
txCredit.vout[0].scriptPubKey.data(),
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static int Grind(const std::vector<std::string>& args, std::string& strPrint)
return EXIT_FAILURE;
}

CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
CDataStream ss(SER_NETWORK);
ss << header;
strPrint = HexStr(ss);
return EXIT_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion src/blockencodings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) :
}

void CBlockHeaderAndShortTxIDs::FillShortTxIDSelector() const {
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
CDataStream stream(SER_NETWORK);
stream << header << nonce;
CSHA256 hasher;
hasher.Write((unsigned char*)&(*stream.begin()), stream.end() - stream.begin());
Expand Down
11 changes: 10 additions & 1 deletion src/chainparamsseeds.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ static const uint8_t chainparams_seed_main[] = {
0x01,0x04,0xd8,0x27,0xfa,0x5b,0x3d,0x62,
0x01,0x04,0xac,0x63,0xbd,0xc6,0x3d,0x62,
0x01,0x04,0x32,0x2f,0xff,0x64,0x3d,0x62,
0x01,0x04,0x5f,0xd9,0x4e,0x51,0x3d,0x62,
0x02,0x10,0x2a,0x02,0xc2,0x07,0x20,0x41,0x38,0x53,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3d,0x62,
0x02,0x10,0x2a,0x02,0xc2,0x07,0x20,0x56,0x65,0x32,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3d,0x62,
0x02,0x10,0x2a,0x02,0xc2,0x07,0x20,0x56,0x65,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3d,0x62,
Expand All @@ -40,6 +39,12 @@ static const uint8_t chainparams_seed_main[] = {
0x02,0x10,0x2a,0x02,0xc2,0x07,0x21,0x10,0x92,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x10,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x10,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x11,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x12,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x13,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x15,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x3d,0x62,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x3d,0x62,
0x02,0x10,0x26,0x02,0xfe,0xc3,0x00,0x02,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x09,0x00,0x91,0x3d,0x62,
Expand Down Expand Up @@ -77,6 +82,10 @@ static const uint8_t chainparams_seed_test[] = {
0x02,0x10,0x2a,0x02,0xc2,0x07,0x21,0x10,0x92,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x10,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x11,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x12,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x13,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x15,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x64,0x72,
0x02,0x10,0x2a,0x10,0x37,0x81,0x05,0x25,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x64,0x72,
0x04,0x20,0x9e,0x5e,0x6c,0xf4,0xe6,0xe8,0xf5,0x7b,0xa1,0xf9,0x36,0x3c,0x5a,0x58,0xea,0x15,0xe8,0xdd,0x02,0x7b,0xce,0xfe,0x11,0x77,0x6a,0xda,0xa2,0x48,0xd9,0xdc,0x19,0xec,0x64,0x72,
Expand Down
4 changes: 2 additions & 2 deletions src/consensus/tx_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state,
strprintf("%s: inputs missing/spent", __func__));
}

// Blackcoin: in v2 transactions use GetAdjustedTime() as TxTime
// Blackcoin: in v2 transactions use GetAdjustedTime() as nTimeTx
int64_t nTimeTx = tx.nTime;
if (!nTimeTx && tx.nVersion >= TX_MAX_STANDARD_VERSION)
if (!nTimeTx && tx.nVersion >= 2)
nTimeTx = GetAdjustedTimeSeconds();

CAmount nValueIn = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/core_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
return false;

std::vector<unsigned char> blockData(ParseHex(strHexBlk));
DataStream ssBlock(blockData);
CDataStream ssBlock(blockData, SER_NETWORK);
try {
ssBlock >> TX_WITH_WITNESS(block);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry
// Transaction version is actually unsigned in consensus checks, just signed in memory,
// so cast to unsigned before giving it to the user.
entry.pushKV("version", static_cast<int64_t>(static_cast<uint32_t>(tx.nVersion)));
if (tx.nTime > 0)
if (tx.nVersion < 2)
entry.pushKV("time", (int64_t)tx.nTime);
entry.pushKV("size", tx.GetTotalSize());
entry.pushKV("vsize", (GetTransactionWeight(tx) + WITNESS_SCALE_FACTOR - 1) / WITNESS_SCALE_FACTOR);
Expand Down
2 changes: 1 addition & 1 deletion src/external_signer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ UniValue ExternalSigner::GetDescriptors(const int account)
bool ExternalSigner::SignTransaction(PartiallySignedTransaction& psbtx, std::string& error)
{
// Serialize the PSBT
DataStream ssTx{};
CDataStream ssTx(SER_NETWORK);
ssTx << psbtx;
// parse ExternalSigner master fingerprint
std::vector<unsigned char> parsed_m_fingerprint = ParseHex(m_fingerprint);
Expand Down
18 changes: 18 additions & 0 deletions src/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,24 @@ class HashWriter
}
};

// Blackcoin: Keep nType
class CHashWriter : public HashWriter
{
private:
const int nType;

public:
CHashWriter() : nType(SER_GETHASH) {}

int GetType() const { return nType; }

template<typename T>
CHashWriter& operator<<(const T& obj) {
::Serialize(*this, obj);
return (*this);
}
};

/** Reads data from an underlying stream, while hashing the read data. */
template <typename Source>
class HashVerifier : public HashWriter
Expand Down
Loading

0 comments on commit 7aa9724

Please sign in to comment.