remove mutually exclusive constraint on selfimport

-ac_beam and -ac_coda cannot be active at the same time

Clusters can do import coin normally even with self-import chains.

-ac_import=KMD (any bitcoinprotocol coin) will make a side chain (not
implemented yet)

Theoretically -ac_beam or -ac_coda can work with side chain (not
implemented yet other than chain params)
This commit is contained in:
jl777
2019-01-01 23:34:31 -11:00
parent 4dbb9e832a
commit e090330823
6 changed files with 95 additions and 55 deletions

View File

@@ -214,16 +214,14 @@ cont:
*/
void CompleteImportTransaction(CTransaction &importTx)
{
TxProof proof;
CTransaction burnTx;
std::vector<CTxOut> payouts;
TxProof proof; CTransaction burnTx; std::vector<CTxOut> payouts; std::vector<uint8_t> rawproof;
if (!UnmarshalImportTx(importTx, proof, burnTx, payouts))
throw std::runtime_error("Couldn't parse importTx");
std::string targetSymbol;
uint32_t targetCCid;
uint256 payoutsHash;
if (!UnmarshalBurnTx(burnTx, targetSymbol, &targetCCid, payoutsHash))
if (!UnmarshalBurnTx(burnTx, targetSymbol, &targetCCid, payoutsHash, rawproof))
throw std::runtime_error("Couldn't parse burnTx");
proof = GetCrossChainProof(burnTx.GetHash(), targetSymbol.data(), targetCCid, proof);