Skip to content

Commit

Permalink
fix: Make TxidFromString() respect string length
Browse files Browse the repository at this point in the history
Appears to have been a dormant bug. Introduced since inception of TxidFromString() in bitcoin#28922.
  • Loading branch information
hodlinator committed Jul 12, 2024
1 parent 7d8dfe2 commit a4ead4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/transaction_identifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ using Wtxid = transaction_identifier<true>;

inline Txid TxidFromString(std::string_view str)
{
return Txid::FromUint256(uint256S(str.data()));
return Txid::FromUint256(uint256S(str));
}

#endif // BITCOIN_UTIL_TRANSACTION_IDENTIFIER_H

0 comments on commit a4ead4e

Please sign in to comment.