Skip to content

Commit 8fe86da

Browse files
authored
dgb: pin oracle SOFTFORKS_REQUIRED set (DGB-distinctive reservealgo+odo) (#273)
Test-only Phase-B pool/share conformance guard. Locks PoolConfig:: SOFTFORKS_REQUIRED to the oracle set in frstrtr/p2pool-dgb-scrypt networks/digibyte.py:25 — {nversionbips,csv,segwit,reservealgo,odo, taproot}. reservealgo and odo are DigiByte-unique; a silent add or drop would mis-signal softfork requirements vs the oracle network. Fenced to src/impl/dgb/test/share_test.cpp only; no shared-base, CMake, or build.yml touch; dgb_share_test already allowlisted. No consensus value changes (guards what already ships). 10/10 green. Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
1 parent 4311e27 commit 8fe86da

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/impl/dgb/test/share_test.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <impl/dgb/coin/rpc_conf.hpp> // #82 external-daemon RPC creds (digibyte.conf)
2323

2424
#include <cstdio>
25+
#include <set>
26+
#include <string>
2527
#include <fstream>
2628

2729
// Sharechain-identity: the isolation primitives (PREFIX / IDENTIFIER) are the
@@ -66,6 +68,23 @@ TEST(DGB_share_test, OraclePoolShareLayer)
6668
"00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
6769
}
6870

71+
// SOFTFORKS_REQUIRED — DGB-distinctive softfork-signalling set. reservealgo
72+
// and odo are DigiByte-unique (absent from BTC/LTC); a silent drop here makes
73+
// the embedded daemon mis-signal softfork requirements vs the oracle network.
74+
// Oracle SSOT: frstrtr/p2pool-dgb-scrypt networks/digibyte.py:25
75+
// set([nversionbips,csv,segwit,reservealgo,odo,taproot])
76+
TEST(DGB_share_test, OracleSoftforksRequired)
77+
{
78+
const std::set<std::string> kExpected = {
79+
"nversionbips", "csv", "segwit", "reservealgo", "odo", "taproot"
80+
};
81+
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED, kExpected);
82+
// Loud guard on the DGB-unique members + cardinality (catches add OR drop).
83+
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("reservealgo"), 1u);
84+
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.count("odo"), 1u);
85+
EXPECT_EQ(dgb::PoolConfig::SOFTFORKS_REQUIRED.size(), 6u);
86+
}
87+
6988
// v35 donation = forrestv P2PK (4104ffd0…ac, 65-byte pubkey push + CHECKSIG).
7089
// v36 donation = combined P2SH (23-byte). get_donation_script() switches on
7190
// share_version at the SEGWIT/merged boundary.

0 commit comments

Comments
 (0)