Resolve "WIP: UTXO Selection and Storage"
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { Bytes, Crypto } from '@xo/primitives';
|
||||
|
||||
const payload = Bytes.fromHex(
|
||||
'00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff',
|
||||
);
|
||||
|
||||
console.time('sha256');
|
||||
|
||||
for (let i = 0; i < 10_000; i++) {
|
||||
Crypto.sha256(payload.toBytes());
|
||||
}
|
||||
|
||||
// NOTE: Around 100ms for 10,000 SHA256's on my machine.
|
||||
// Not too bad, but might still be worth avoiding if trivial.
|
||||
console.timeEnd('sha256');
|
||||
Reference in New Issue
Block a user