mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge 380e1f44e8 into merged_master (Bitcoin PR bitcoin/bitcoin#30349)
This commit is contained in:
commit
d02f82d4c4
2 changed files with 12 additions and 6 deletions
|
|
@ -192,10 +192,16 @@ static void SHA512(benchmark::Bench& bench)
|
|||
|
||||
static void SipHash_32b(benchmark::Bench& bench)
|
||||
{
|
||||
uint256 x;
|
||||
uint64_t k1 = 0;
|
||||
FastRandomContext rng{/*fDeterministic=*/true};
|
||||
auto k0{rng.rand64()}, k1{rng.rand64()};
|
||||
auto val{rng.rand256()};
|
||||
auto i{0U};
|
||||
bench.run([&] {
|
||||
*((uint64_t*)x.begin()) = SipHashUint256(0, ++k1, x);
|
||||
ankerl::nanobench::doNotOptimizeAway(SipHashUint256(k0, k1, val));
|
||||
++k0;
|
||||
++k1;
|
||||
++i;
|
||||
val.data()[i % uint256::size()] ^= i & 0xFF;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -581,11 +581,11 @@ class PSBTTest(BitcoinTestFramework):
|
|||
|
||||
# Make sure that a non-psbt with signatures cannot be converted
|
||||
signedtx = self.nodes[0].signrawtransactionwithwallet(rawtx['hex'])
|
||||
assert_raises_rpc_error(-22, "Inputs must not have scriptWitnesses",
|
||||
assert_raises_rpc_error(-22, "Inputs must not have",
|
||||
self.nodes[0].converttopsbt, hexstring=signedtx['hex']) # permitsigdata=False by default
|
||||
assert_raises_rpc_error(-22, "Inputs must not have scriptWitnesses",
|
||||
assert_raises_rpc_error(-22, "Inputs must not have",
|
||||
self.nodes[0].converttopsbt, hexstring=signedtx['hex'], permitsigdata=False)
|
||||
assert_raises_rpc_error(-22, "Inputs must not have scriptWitnesses",
|
||||
assert_raises_rpc_error(-22, "Inputs must not have",
|
||||
self.nodes[0].converttopsbt, hexstring=signedtx['hex'], permitsigdata=False, iswitness=True)
|
||||
# Unless we allow it to convert and strip signatures
|
||||
self.nodes[0].converttopsbt(hexstring=signedtx['hex'], permitsigdata=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue