mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Remove unused TransactionError constants
This commit is contained in:
parent
38989ab03f
commit
fa9b60c842
9 changed files with 45 additions and 70 deletions
10
src/psbt.cpp
10
src/psbt.cpp
|
|
@ -263,21 +263,19 @@ bool FinalizeAndExtractPSBT(PartiallySignedTransaction& psbtx, CMutableTransacti
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CombinePSBTs(PartiallySignedTransaction& out, TransactionError& error, const std::vector<PartiallySignedTransaction>& psbtxs)
|
||||
TransactionError CombinePSBTs(PartiallySignedTransaction& out, const std::vector<PartiallySignedTransaction>& psbtxs)
|
||||
{
|
||||
out = psbtxs[0]; // Copy the first one
|
||||
|
||||
// Merge
|
||||
for (auto it = std::next(psbtxs.begin()); it != psbtxs.end(); ++it) {
|
||||
if (!out.Merge(*it)) {
|
||||
error = TransactionError::PSBT_MISMATCH;
|
||||
return false;
|
||||
return TransactionError::PSBT_MISMATCH;
|
||||
}
|
||||
}
|
||||
if (!out.IsSane()) {
|
||||
error = TransactionError::INVALID_PSBT;
|
||||
return false;
|
||||
return TransactionError::INVALID_PSBT;
|
||||
}
|
||||
|
||||
return true;
|
||||
return TransactionError::OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue