Skip to content
Merged
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions src/impl/dgb/test/share_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <impl/dgb/coin/rpc_conf.hpp> // #82 external-daemon RPC creds (digibyte.conf)

#include <cstdio>
#include <set>
#include <string>
#include <fstream>

// Sharechain-identity: the isolation primitives (PREFIX / IDENTIFIER) are the
Expand Down Expand Up @@ -63,6 +65,23 @@ TEST(DGB_share_test, OraclePoolShareLayer)
"00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
}

// SOFTFORKS_REQUIRED — DGB-distinctive softfork-signalling set. reservealgo
// and odo are DigiByte-unique (absent from BTC/LTC); a silent drop here makes
// the embedded daemon mis-signal softfork requirements vs the oracle network.
// Oracle SSOT: frstrtr/p2pool-dgb-scrypt networks/digibyte.py:25
// set([nversionbips,csv,segwit,reservealgo,odo,taproot])
TEST(DGB_share_test, OracleSoftforksRequired)
{
const std::set<std::string> kExpected = {
"nversionbips", "csv", "segwit", "reservealgo", "odo", "taproot"
};
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED, kExpected);
// Loud guard on the DGB-unique members + cardinality (catches add OR drop).
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("reservealgo"), 1u);
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("odo"), 1u);
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.size(), 6u);
}

// v35 donation = forrestv P2PK (4104ffd0…ac, 65-byte pubkey push + CHECKSIG).
// v36 donation = combined P2SH (23-byte). get_donation_script() switches on
// share_version at the SEGWIT/merged boundary.
Expand Down
Loading