mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
remove tabs from IsValidPegin
This commit is contained in:
parent
b401ff0c1e
commit
2940c4e0ea
1 changed files with 7 additions and 7 deletions
|
|
@ -2407,13 +2407,13 @@ bool IsValidPeginWitness(const CScriptWitness& pegin_witness, const COutPoint& p
|
||||||
|
|
||||||
// Get serialized transaction
|
// Get serialized transaction
|
||||||
Sidechain::Bitcoin::CTransactionRef pegtx;
|
Sidechain::Bitcoin::CTransactionRef pegtx;
|
||||||
try {
|
try {
|
||||||
CDataStream pegtx_stream(stack[4], SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream pegtx_stream(stack[4], SER_NETWORK, PROTOCOL_VERSION);
|
||||||
pegtx_stream >> pegtx;
|
pegtx_stream >> pegtx;
|
||||||
if (!pegtx_stream.empty()) {
|
if (!pegtx_stream.empty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
// Invalid encoding of transaction
|
// Invalid encoding of transaction
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2423,7 +2423,7 @@ bool IsValidPeginWitness(const CScriptWitness& pegin_witness, const COutPoint& p
|
||||||
std::vector<uint256> txHashes;
|
std::vector<uint256> txHashes;
|
||||||
std::vector<unsigned int> txIndices;
|
std::vector<unsigned int> txIndices;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CDataStream merkleBlockStream(stack[5], SER_NETWORK, PROTOCOL_VERSION);
|
CDataStream merkleBlockStream(stack[5], SER_NETWORK, PROTOCOL_VERSION);
|
||||||
merkleBlockStream >> merkle_block;
|
merkleBlockStream >> merkle_block;
|
||||||
if (!merkleBlockStream.empty() || !CheckBitcoinProof(merkle_block.header.GetHash(), merkle_block.header.nBits)) {
|
if (!merkleBlockStream.empty() || !CheckBitcoinProof(merkle_block.header.GetHash(), merkle_block.header.nBits)) {
|
||||||
|
|
@ -2432,7 +2432,7 @@ bool IsValidPeginWitness(const CScriptWitness& pegin_witness, const COutPoint& p
|
||||||
if (merkle_block.txn.ExtractMatches(txHashes, txIndices) != merkle_block.header.hashMerkleRoot || txHashes.size() != 1) {
|
if (merkle_block.txn.ExtractMatches(txHashes, txIndices) != merkle_block.header.hashMerkleRoot || txHashes.size() != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
// Invalid encoding of merkle block
|
// Invalid encoding of merkle block
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue