mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Remove unnecessary NONNEGATIVE_SIGNED
Switch to unsigned encoding, which is backwards compatible and avoids MSVC error reported https://github.com/bitcoin/bitcoin/issues/12732
This commit is contained in:
@@ -25,7 +25,7 @@ class TxInUndoSerializer
|
||||
public:
|
||||
template<typename Stream>
|
||||
void Serialize(Stream &s) const {
|
||||
::Serialize(s, VARINT(txout->nHeight * 2 + (txout->fCoinBase ? 1 : 0), VarIntMode::NONNEGATIVE_SIGNED));
|
||||
::Serialize(s, VARINT(txout->nHeight * 2 + (txout->fCoinBase ? 1u : 0u)));
|
||||
if (txout->nHeight > 0) {
|
||||
// Required to maintain compatibility with older undo format.
|
||||
::Serialize(s, (unsigned char)0);
|
||||
|
||||
Reference in New Issue
Block a user