Closed kyluke closed 7 years ago
Are you sure you added the coins related to all the inputs and not just the one you sign ? And that their value is correct ?
Hi @NicolasDorier.
After further investigation, the problem occured due to malleated transaction IDs. We have a system in place which dealt with those, but a few slipped through. This is been fixed.
As a point of interest, how is the NBitcoin library determining which transaction ID's it can use and which it cannot? Does it fail to sign the input or is there another indicator being used that a given transaction ID is not usable?
Thanks Nicolas.
the TransactionBuilder does not care about whether or not you can use the Transaction ID. It only cares if you have the Coin so it can build the transaction. You need to gather the coins to spend yourself. Either with a block explorer or with BitcoinCore listunspent.
Hi Nicolas.
I've come across a problem which causes the library to create transactions with negative mining fees. I believe it is due to incorrectly discarding input transactions provided in a
List<Coin>
object.The problem is as follows.
I add in input transactions to a
List<Coin>
object in a loop:For this example, I use the following transaction ID's:
Then I add a number of outputs to the transaction:
Which results in:
As you can see, the library is for some reason discarding the other 2 input transactions, required to make this transaction. Is there something I am perhaps doing incorrectly?
Thanks Nicolas.