This removes inputs spent by a transaction from the stored UTXOs. If
the UtxoStore is modified, all frontends are notified of the new
confirmed and unconfirmed account balances.
More work must be done later to check that the transaction actually
does occur in a later block. btcd will make a best try effort to
relay the tx to the network, but it is still ultimately btcwallet's
responsibility. Added a TODO so I remember to do this in the future.
We need to notify frontends of notifications for every account
(wallet), not just the "current" opened account, since wallet will
need to have multiple wallets open at the same time. Frontends will
have to filter notifications to show only details of only one account
if they need to display just one account at a time.
As of this commit, account balances and lock state notifications are
using this per-account notification scheme.
Use on mainnet is not recommended until extensive testing has been
done, and should be done at your own risk. Run btcwallet with
--mainnet to operate on main Bitcoin network.
This is a big change that also many general fixes to problems found
when creating transactions. In particular the Utxo and Tx formats and
serialization functions were updated with additional information that
would be necessary for rolling back old utxo and tx data data after
btcd chain switches. This change also implements the json methods
'sendfrom' and 'sendmany' to create a new transaction based on a
frontend request.
Transactions are currently not sent to btcd since the tx relay code is
not finished yet, so a temporary error is returned back to frontends
who try to send new transactions.
We must instead wait for the user to explicitly generate their own
wallet for an account name. This is because all btcwallet wallets
must be encrypted, and the passphrase must be known at time of wallet
generation.