tests for getting MoM in Eval and fixes

This commit is contained in:
Scott Sadler
2018-04-06 03:52:30 -03:00
parent e625be68a9
commit 9bf132a5a8
9 changed files with 307 additions and 91 deletions

View File

@@ -2,13 +2,11 @@
#define BETPROTOCOL_H
#include "pubkey.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "cryptoconditions/include/cryptoconditions.h"
#define ExecMerkle CBlock::CheckMerkleBranch
class MoMProof
{
public:
@@ -18,6 +16,7 @@ public:
MoMProof() {}
MoMProof(int i, std::vector<uint256> b, uint256 n) : notarisationHash(n), nIndex(i), branch(b) {}
uint256 Exec(uint256 hash) const { return CBlock::CheckMerkleBranch(hash, branch, nIndex); }
ADD_SERIALIZE_METHODS;
@@ -79,7 +78,4 @@ public:
};
CC* CCNewSecp256k1(CPubKey k);
#endif /* BETPROTOCOL_H */