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;
|
uint256 hash;
|
||||||
SproutMerkleTree sproutTree;
|
SproutMerkleTree sproutTree;
|
||||||
SaplingMerkleTree saplingTree;
|
SaplingMerkleTree saplingTree;
|
||||||
|
OrchardMerkleTree orchardTree;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FakeCoinsViewDB(std::string dbName, uint256& hash) : db(GetDataDir() / dbName, 100, false, false), hash(hash) {}
|
FakeCoinsViewDB(std::string dbName, uint256& hash) : db(GetDataDir() / dbName, 100, false, false), hash(hash) {}
|
||||||
|
@ -468,6 +469,14 @@ public:
|
||||||
return false;
|
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 {
|
bool GetNullifier(const uint256 &nf, ShieldedType type) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -490,6 +499,8 @@ public:
|
||||||
return sproutTree.root();
|
return sproutTree.root();
|
||||||
case SAPLING:
|
case SAPLING:
|
||||||
return saplingTree.root();
|
return saplingTree.root();
|
||||||
|
case ORCHARD:
|
||||||
|
return orchardTree.root();
|
||||||
default:
|
default:
|
||||||
throw new std::runtime_error("Unknown shielded type");
|
throw new std::runtime_error("Unknown shielded type");
|
||||||
}
|
}
|
||||||
|
@ -499,10 +510,14 @@ public:
|
||||||
const uint256 &hashBlock,
|
const uint256 &hashBlock,
|
||||||
const uint256 &hashSproutAnchor,
|
const uint256 &hashSproutAnchor,
|
||||||
const uint256 &hashSaplingAnchor,
|
const uint256 &hashSaplingAnchor,
|
||||||
|
const uint256 &hashOrchardAnchor,
|
||||||
CAnchorsSproutMap &mapSproutAnchors,
|
CAnchorsSproutMap &mapSproutAnchors,
|
||||||
CAnchorsSaplingMap &mapSaplingAnchors,
|
CAnchorsSaplingMap &mapSaplingAnchors,
|
||||||
|
CAnchorsOrchardMap &mapOrchardAnchors,
|
||||||
CNullifiersMap &mapSproutNullifiers,
|
CNullifiersMap &mapSproutNullifiers,
|
||||||
CNullifiersMap &mapSaplingNullifiers) {
|
CNullifiersMap &mapSaplingNullifiers,
|
||||||
|
CNullifiersMap &mapOrchardNullifiers,
|
||||||
|
CHistoryCacheMap &historyCacheMap) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue