Merge pull request #5312 from str4d/fix-connectblockslow-bench
bench: Add Orchard logic to zcbenchmarks
This commit is contained in:
commit
5ef1b9b8cc
|
@ -448,6 +448,7 @@ class FakeCoinsViewDB : public CCoinsView {
|
|||
uint256 hash;
|
||||
SproutMerkleTree sproutTree;
|
||||
SaplingMerkleTree saplingTree;
|
||||
OrchardMerkleTree orchardTree;
|
||||
|
||||
public:
|
||||
FakeCoinsViewDB(std::string dbName, uint256& hash) : db(GetDataDir() / dbName, 100, false, false), hash(hash) {}
|
||||
|
@ -468,6 +469,14 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
bool GetOrchardAnchorAt(const uint256 &rt, OrchardMerkleTree &tree) const {
|
||||
if (rt == orchardTree.root()) {
|
||||
tree = orchardTree;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetNullifier(const uint256 &nf, ShieldedType type) const {
|
||||
return false;
|
||||
}
|
||||
|
@ -490,6 +499,8 @@ public:
|
|||
return sproutTree.root();
|
||||
case SAPLING:
|
||||
return saplingTree.root();
|
||||
case ORCHARD:
|
||||
return orchardTree.root();
|
||||
default:
|
||||
throw new std::runtime_error("Unknown shielded type");
|
||||
}
|
||||
|
@ -499,10 +510,14 @@ public:
|
|||
const uint256 &hashBlock,
|
||||
const uint256 &hashSproutAnchor,
|
||||
const uint256 &hashSaplingAnchor,
|
||||
const uint256 &hashOrchardAnchor,
|
||||
CAnchorsSproutMap &mapSproutAnchors,
|
||||
CAnchorsSaplingMap &mapSaplingAnchors,
|
||||
CAnchorsOrchardMap &mapOrchardAnchors,
|
||||
CNullifiersMap &mapSproutNullifiers,
|
||||
CNullifiersMap &mapSaplingNullifiers) {
|
||||
CNullifiersMap &mapSaplingNullifiers,
|
||||
CNullifiersMap &mapOrchardNullifiers,
|
||||
CHistoryCacheMap &historyCacheMap) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue