debug logging disabled
This commit is contained in:
@@ -1247,7 +1247,7 @@ void _HeirList(struct CCcontract_info *cp, UniValue &result)
|
|||||||
GetCCaddress(cp, markeraddr, GetUnspendable(cp, NULL));
|
GetCCaddress(cp, markeraddr, GetUnspendable(cp, NULL));
|
||||||
SetCCunspents(unspentOutputs, markeraddr);
|
SetCCunspents(unspentOutputs, markeraddr);
|
||||||
|
|
||||||
std::cerr << "HeirList() finding heir marker from unspendable addr=" << markeraddr << " unspentOutputs.size()=" << unspentOutputs.size() << '\n';
|
//std::cerr << "HeirList() finding heir marker from unspendable addr=" << markeraddr << " unspentOutputs.size()=" << unspentOutputs.size() << '\n';
|
||||||
|
|
||||||
// TODO: move marker to special cc addr to prevent checking all tokens
|
// TODO: move marker to special cc addr to prevent checking all tokens
|
||||||
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue>>::const_iterator it = unspentOutputs.begin(); it != unspentOutputs.end(); it++) {
|
for (std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue>>::const_iterator it = unspentOutputs.begin(); it != unspentOutputs.end(); it++) {
|
||||||
@@ -1256,7 +1256,7 @@ void _HeirList(struct CCcontract_info *cp, UniValue &result)
|
|||||||
uint256 tokenid;
|
uint256 tokenid;
|
||||||
int32_t vout = (int32_t)it->first.index;
|
int32_t vout = (int32_t)it->first.index;
|
||||||
|
|
||||||
std::cerr << "HeirList() checking txid=" << txid.GetHex() << " vout=" << vout << '\n';
|
//std::cerr << "HeirList() checking txid=" << txid.GetHex() << " vout=" << vout << '\n';
|
||||||
|
|
||||||
CTransaction fundingtx;
|
CTransaction fundingtx;
|
||||||
if (GetTransaction(txid, fundingtx, hashBlock, false)) {
|
if (GetTransaction(txid, fundingtx, hashBlock, false)) {
|
||||||
|
|||||||
@@ -631,21 +631,20 @@ public:
|
|||||||
uint256 fundingTxidInOpret = zeroid, dummyTxid, tokenid = zeroid, initialTokenid = zeroid;
|
uint256 fundingTxidInOpret = zeroid, dummyTxid, tokenid = zeroid, initialTokenid = zeroid;
|
||||||
uint8_t dummyIsHeirSpendingBegan;
|
uint8_t dummyIsHeirSpendingBegan;
|
||||||
|
|
||||||
std::cerr << "CMarkerValidator::validateVin() prevVout.size()=" << prevVout.size() << " prevN=" << prevN << std::endl;
|
//std::cerr << "CMarkerValidator::validateVin() prevVout.size()=" << prevVout.size() << " prevN=" << prevN << std::endl;
|
||||||
|
|
||||||
if (prevVout.size() > 0) {
|
if (prevVout.size() > 0) {
|
||||||
|
|
||||||
// get funcId for prev tx:
|
// get funcId for prev tx:
|
||||||
uint8_t funcId = DecodeHeirEitherOpRet(prevVout[prevVout.size()-1].scriptPubKey, tokenid, fundingTxidInOpret, dummyIsHeirSpendingBegan, true);
|
uint8_t funcId = DecodeHeirEitherOpRet(prevVout[prevVout.size()-1].scriptPubKey, tokenid, fundingTxidInOpret, dummyIsHeirSpendingBegan, true);
|
||||||
|
|
||||||
std::cerr << "CMarkerValidator::validateVin() funcId=" << (funcId?funcId:' ') << std::endl;
|
//std::cerr << "CMarkerValidator::validateVin() funcId=" << (funcId?funcId:' ') << std::endl;
|
||||||
|
|
||||||
if (funcId == 'F' && prevN == 1) { // do not allow to spend 'F' marker's vout
|
if (funcId == 'F' && prevN == 1) { // do not allow to spend 'F' marker's vout
|
||||||
message = std::string("spending marker not allowed");
|
message = std::string("spending marker not allowed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cerr << "CMarkerValidator::validateVin() exits with true" << std::endl;
|
//std::cerr << "CMarkerValidator::validateVin() exits with true" << std::endl;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user