mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
psbt: Check subkey_len not key.size()
This commit is contained in:
parent
b4935a51c0
commit
547b3e30ca
1 changed files with 5 additions and 5 deletions
10
src/psbt.h
10
src/psbt.h
|
|
@ -925,7 +925,7 @@ struct PSBTInput
|
|||
{
|
||||
if (!key_lookup.emplace(key).second) {
|
||||
throw std::ios_base::failure("Duplicate Key, explicit value is already provided");
|
||||
} else if (key.size() != 1) {
|
||||
} else if (subkey_len != 1) {
|
||||
throw std::ios_base::failure("Input explicit value is more than one byte type");
|
||||
}
|
||||
CAmount v;
|
||||
|
|
@ -937,7 +937,7 @@ struct PSBTInput
|
|||
{
|
||||
if (!key_lookup.emplace(key).second) {
|
||||
throw std::ios_base::failure("Duplicate Key, explicit value proof is already provided");
|
||||
} else if (key.size() != 1) {
|
||||
} else if (subkey_len != 1) {
|
||||
throw std::ios_base::failure("Input explicit value proof is more than one byte type");
|
||||
}
|
||||
s >> m_value_proof;
|
||||
|
|
@ -947,7 +947,7 @@ struct PSBTInput
|
|||
{
|
||||
if (!key_lookup.emplace(key).second) {
|
||||
throw std::ios_base::failure("Duplicate Key, explicit asset is already provided");
|
||||
} else if (key.size() != 1) {
|
||||
} else if (subkey_len != 1) {
|
||||
throw std::ios_base::failure("Input explicit asset is more than one byte type");
|
||||
}
|
||||
UnserializeFromVector(s, m_explicit_asset);
|
||||
|
|
@ -957,7 +957,7 @@ struct PSBTInput
|
|||
{
|
||||
if (!key_lookup.emplace(key).second) {
|
||||
throw std::ios_base::failure("Duplicate Key, explicit asset proof is already provided");
|
||||
} else if (key.size() != 1) {
|
||||
} else if (subkey_len != 1) {
|
||||
throw std::ios_base::failure("Input explicit asset proof is more than one byte type");
|
||||
}
|
||||
s >> m_value_proof;
|
||||
|
|
@ -967,7 +967,7 @@ struct PSBTInput
|
|||
{
|
||||
if (!key_lookup.emplace(key).second) {
|
||||
throw std::ios_base::failure("Duplicate Key, issuance needs blinded flag is already provided");
|
||||
} else if (key.size() != 1) {
|
||||
} else if (subkey_len != 1) {
|
||||
throw std::ios_base::failure("Input issuance needs blinded flag is more than one byte type");
|
||||
}
|
||||
bool b;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue