mirror of
https://github.com/jwinterm/myriadcoin.git
synced 2026-10-23 06:38:47 +02:00
auxpow
This commit is contained in:
@@ -1135,6 +1135,17 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
|
||||
// CBlock and CBlockIndex
|
||||
//
|
||||
|
||||
std::string CDiskBlockIndex::ToString() const
|
||||
{
|
||||
std::string str = "CDiskBlockIndex(";
|
||||
str += CBlockIndex::ToString();
|
||||
str += strprintf("\n hashBlock=%s, hashPrev=%s, hashParentBlock=%s)",
|
||||
GetBlockHash().ToString().c_str(),
|
||||
hashPrev.ToString().c_str(),
|
||||
(auxpow.get() != NULL) ? auxpow->GetParentBlockHash(GetAlgo()).ToString().substr(0,20).c_str() : "-");
|
||||
return str;
|
||||
}
|
||||
|
||||
bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
|
||||
{
|
||||
// Open history file to append
|
||||
|
||||
+1
-10
@@ -1061,7 +1061,6 @@ public:
|
||||
//CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) {
|
||||
// hashPrev = (pprev ? pprev->GetBlockHash() : 0);
|
||||
//}
|
||||
|
||||
explicit CDiskBlockIndex(CBlockIndex* pindex, boost::shared_ptr<CAuxPow> auxpow) : CBlockIndex(*pindex) {
|
||||
hashPrev = (pprev ? pprev->GetBlockHash() : 0);
|
||||
this->auxpow = auxpow;
|
||||
@@ -1105,15 +1104,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
std::string ToString() const
|
||||
{
|
||||
std::string str = "CDiskBlockIndex(";
|
||||
str += CBlockIndex::ToString();
|
||||
str += strprintf("\n hashBlock=%s, hashPrev=%s)",
|
||||
GetBlockHash().ToString().c_str(),
|
||||
hashPrev.ToString().c_str());
|
||||
return str;
|
||||
}
|
||||
std::string ToString() const;
|
||||
|
||||
void print() const
|
||||
{
|
||||
|
||||
+2
-2
@@ -26,13 +26,13 @@ extern const std::string CLIENT_DATE;
|
||||
// network protocol versioning
|
||||
//
|
||||
|
||||
static const int PROTOCOL_VERSION = 70002;
|
||||
static const int PROTOCOL_VERSION = 70003;
|
||||
|
||||
// intial proto version, to be increased after version/verack negotiation
|
||||
static const int INIT_PROTO_VERSION = 209;
|
||||
|
||||
// disconnect from peers older than this proto version
|
||||
static const int MIN_PEER_PROTO_VERSION = 209;
|
||||
static const int MIN_PEER_PROTO_VERSION = 70002;
|
||||
|
||||
// nTime field added to CAddress, starting with this version;
|
||||
// if possible, avoid requesting addresses nodes older than this
|
||||
|
||||
Reference in New Issue
Block a user