Event JSON
{
"id": "c82577dc2b795ce9a521be6a3eb76d8086fc509e396470fb3cedceadc8fc383f",
"pubkey": "d3052ca3e3d523b1ec80671eb1bba0517a2f522e195778dc83dd03a8d84a170e",
"created_at": 1736992501,
"kind": 1,
"tags": [
[
"e",
"e3a1db0a43887333cb004eb71ee156e5c571b532c26c0fe9f69358b3376000dc",
"wss://ditto.pub/relay",
"root",
"d3052ca3e3d523b1ec80671eb1bba0517a2f522e195778dc83dd03a8d84a170e"
],
[
"e",
"ff89c2be929b5410ca8d5bb4aab7b39ba141b570d8619628927483608bf80e7d",
"wss://ditto.pub/relay",
"reply",
"ccaa58e37c99c85bc5e754028a718bd46485e5d3cb3345691ecab83c755d48cc"
],
[
"p",
"ccaa58e37c99c85bc5e754028a718bd46485e5d3cb3345691ecab83c755d48cc",
"wss://ditto.pub/relay"
],
[
"r",
"https://github.com/vnprc/hashpool/blob/master/protocols/v2/subprotocols/mining/src/cashu.rs#L608"
],
[
"t",
"rust"
]
],
"content": "Well this was throwaway code so I didn't commit it. Here is the current version of that function: https://github.com/vnprc/hashpool/blob/master/protocols/v2/subprotocols/mining/src/cashu.rs#L608\n\nI went with a helper function approach. The code is much cleaner this way. It was a battle to get the u64 out of Amount but even after that I was confused about why I had to interface a u64 with a usize.\n\nWhy does core::array:from_fn use usize? I haven't really dealt with this primitive before. Is this related to CPU architecture?\n\n#rust, she is a demanding mistress.",
"sig": "312571fcf65b5e7b89baa4877088b4110bcdeb7ffdb3e32d134f98b44da5e77b58222dad636b5e36382ead029e1fec813e363b5b6e4ba84adc3e3e2efe347741"
}