Currently the Transaction too large
is calculated on the transaction that is returned from CreateTransaction
. This does not make sense for when CreateTransaction
is being used for fundrawtransaction
as no signing occurs so the final returned transaction is missing signatures. Thus users may successfully fund a transaction but fail to broadcast it after it has been fully signed.
So instead we should figure out whether the transaction we are funding will be too large after it is signed. We can do this by having CalculateMaximumSignedTxSize
also return the transaction weight and then comparing that weight against the maximum weight.