Resolve "WIP: UTXO Selection and Storage"

This commit is contained in:
Jim Hamill
2025-01-11 08:39:24 +00:00
parent f934216d68
commit 33fd9bac4d
156 changed files with 13304 additions and 4595 deletions
+15
View File
@@ -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');