corr getting 1of2 addr in 1of2 validator
This commit is contained in:
@@ -902,10 +902,12 @@ template <typename Helper>UniValue HeirClaim(uint256 fundingtxid, uint64_t txfee
|
|||||||
mtx.vout.push_back(CTxOut(txfee, CScript() << ParseHex(HexStr(markerpubkey)) << OP_CHECKSIG)); // txfee 1, txfee 2 - for miners
|
mtx.vout.push_back(CTxOut(txfee, CScript() << ParseHex(HexStr(markerpubkey)) << OP_CHECKSIG)); // txfee 1, txfee 2 - for miners
|
||||||
std::cerr << "HeirClaim() adding markeraddr=" << markeraddr << '\n'; */
|
std::cerr << "HeirClaim() adding markeraddr=" << markeraddr << '\n'; */
|
||||||
|
|
||||||
uint8_t myprivkey[32];
|
// get address of 1of2 cond
|
||||||
char coinaddr[64];
|
char coinaddr[64];
|
||||||
// set priv key addresses in CC structure:
|
|
||||||
Helper::GetCoinsOrTokensCCaddress1of2(coinaddr, ownerPubkey, heirPubkey);
|
Helper::GetCoinsOrTokensCCaddress1of2(coinaddr, ownerPubkey, heirPubkey);
|
||||||
|
|
||||||
|
// retrieve priv key addresses for FinalizeCCtx:
|
||||||
|
uint8_t myprivkey[32];
|
||||||
Myprivkey(myprivkey);
|
Myprivkey(myprivkey);
|
||||||
|
|
||||||
// set pubkeys for finding 1of2 cc in FinalizeCCtx to sign it:
|
// set pubkeys for finding 1of2 cc in FinalizeCCtx to sign it:
|
||||||
|
|||||||
@@ -419,7 +419,9 @@ public:
|
|||||||
|
|
||||||
char shouldBeAddr[65], ccAddr[65];
|
char shouldBeAddr[65], ccAddr[65];
|
||||||
|
|
||||||
GetCCaddress1of2(m_cp, shouldBeAddr, ownerPubkey, heirPubkey);
|
//GetCCaddress1of2(m_cp, shouldBeAddr, ownerPubkey, heirPubkey);
|
||||||
|
Helper::GetCoinsOrTokensCCaddress1of2(shouldBeAddr, ownerPubkey, heirPubkey);
|
||||||
|
|
||||||
if (vout.scriptPubKey.IsPayToCryptoCondition()) {
|
if (vout.scriptPubKey.IsPayToCryptoCondition()) {
|
||||||
if (Getscriptaddress(ccAddr, vout.scriptPubKey) && strcmp(shouldBeAddr, ccAddr) == 0) {
|
if (Getscriptaddress(ccAddr, vout.scriptPubKey) && strcmp(shouldBeAddr, ccAddr) == 0) {
|
||||||
//std::cerr << "CCC1of2AddressValidator::validateVout() exits with true" << std::endl;
|
//std::cerr << "CCC1of2AddressValidator::validateVout() exits with true" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user