SiaFoundation / hostd

The next-generation of Sia storage providing software. More performant. More stable. Support for larger nodes.
https://sia.tech/software/hostd
MIT License
39 stars 11 forks source link

Fix incorrect pending transaction value #399

Closed alexfreska closed 4 months ago

alexfreska commented 5 months ago
serveriukai commented 5 months ago

adding screenshot here: last three transactions were all -1000 SC strange-transfers

alexfreska commented 4 months ago

@n8maninger the siacoin values are calculated as BigNumber(t.inflow).minus(t.outflow) for both pending and regular transactions - is this approach incorrect? I just tested sending 50 SC, and it looks like inflow is 49 and outflow is 0 in the pending transaction data.

Screenshot 2024-06-12 at 4 10 45 PM
alexfreska commented 4 months ago

Ah interesting, @n8maninger if I do the opposite and send 100 siacoin to hostd, the incoming 100 siacoin value shows as inflow 100, outflow 0.