Author

Topic: Error validating Transaction. Sum of inputs lesser than outputs (Read 169 times)

HCP
legendary
Activity: 2086
Merit: 4361
I think it may be because you have called transaction.to() twice?

Each time you do this, I believe you are creating a new output... so I suspect you have ONE UTXO (input)... but have then created TWO outputs...

transaction.to(main_wallet, max);

and then

transaction.to(main_wallet, max-finalFee);

This is also the most likely reason why the sum of your outputs is a little under twice the input... 39962 * 2 = 79924... your outputs sum to 78904, because of the "-finalFee" (ie. it has subtracted a fee of 1020).
LRZ
newbie
Activity: 3
Merit: 0
Hi I was wondering if someone could help me out with some code.
I'm trying to create a HD wallet for a user to deposit into, and then move that money to a main wallet once that deposit has been confirmed.
I'm having a little trouble. Quite new to blockchain dev and and how it all works.

Any help would be greatly appreciated.

https://stackoverflow.com/questions/53771644/error-validating-transaction-sum-of-inputs-lesser-than-outputs-bitcore
Jump to: