rpc methods for cross chain transactions

This commit is contained in:
Scott Sadler
2018-05-22 15:16:37 -03:00
parent 0df96a2f06
commit 0b485d3c66
9 changed files with 74 additions and 32 deletions

View File

@@ -133,7 +133,7 @@ TEST_F(TestCrossChain, testCreateAndValidateImportProof)
}
/*
* Generate proof
* Test a proof
*/
uint256 txid = blocks[7].vtx[0].GetHash();
TxProof proof = GetAssetchainProof(txid);
@@ -141,8 +141,15 @@ TEST_F(TestCrossChain, testCreateAndValidateImportProof)
E_UNMARSHAL(RecvIPC(), ss >> proof);
std::pair<uint256,NotarisationData> bn;
if (!GetNextBacknotarisation(proof.first, bn)) return 1;
return proof.second.Exec(txid) == bn.second.MoMoM ? 0 : 1;
if (!GetNextBacknotarisation(proof.first, bn)) {
printf("GetNextBackNotarisation failed\n");
return 1;
}
if (proof.second.Exec(txid) != bn.second.MoMoM) {
printf("MoMom incorrect\n");
return 1;
}
return 0;
};
auto RunTestKmd = [&] ()