mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge #20464: refactor: Treat CDataStream bytes as uint8_t
fa29272459Remove redundant MakeUCharSpan wrappers (MarcoFalke)faf4aa2f47Remove CDataStream::Init in favor of C++11 member initialization (MarcoFalke)fada14b948Treat CDataStream bytes as uint8_t (MarcoFalke)fa8bdb048erefactor: Drop CDataStream constructors in favor of one taking a Span of bytes (MarcoFalke)faa96f841fRemove unused CDataStream methods (MarcoFalke) Pull request description: Using `uint8_t` for raw bytes has a style benefit: * The signedness is clear from reading the code, as it does not depend on the architecture Other clean-ups in this pull include: * Remove unused methods * Constructor is simplified with `Span` * Remove `Init()` member in favor of C++11 member initialization ACKs for top commit: laanwj: code review ACKfa29272459theStack: ACKfa29272459🍾 Tree-SHA512: 931ee28bd99843d7e894b48e90e1187ffb0278677c267044b3c0c255069d9bbd9298ab2e539b1002a30b543d240450eaec718ef4ee95a7fd4be0a295e926343f
This commit is contained in:
@@ -1345,7 +1345,7 @@ static RPCHelpMan combinepsbt()
|
||||
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << merged_psbt;
|
||||
return EncodeBase64(MakeUCharSpan(ssTx));
|
||||
return EncodeBase64(ssTx);
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1484,7 +1484,7 @@ static RPCHelpMan createpsbt()
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << psbtx;
|
||||
|
||||
return EncodeBase64(MakeUCharSpan(ssTx));
|
||||
return EncodeBase64(ssTx);
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1553,7 +1553,7 @@ static RPCHelpMan converttopsbt()
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << psbtx;
|
||||
|
||||
return EncodeBase64(MakeUCharSpan(ssTx));
|
||||
return EncodeBase64(ssTx);
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1644,7 +1644,7 @@ static RPCHelpMan utxoupdatepsbt()
|
||||
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << psbtx;
|
||||
return EncodeBase64(MakeUCharSpan(ssTx));
|
||||
return EncodeBase64(ssTx);
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -1740,7 +1740,7 @@ static RPCHelpMan joinpsbts()
|
||||
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << shuffled_psbt;
|
||||
return EncodeBase64(MakeUCharSpan(ssTx));
|
||||
return EncodeBase64(ssTx);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user