Bug fixes in wallet and related API
Fixes a few loose ends in the full cycle of sending coins, accepting them, pushing that transaction to the pool and having it mined. More specifically: * The API output endpoint needs to be a UTXO endpoint, as the server can't make any guarantee about having a spent output. * Bubbling up HTTP not found errors. * Wallet output status checker now handles spent outputs. * Transaction pool validates the transaction before accepting it. * Fixed the operation API routes. * Fixed too greedy wallet coin selection loop.
This commit is contained in:
+1
-2
@@ -209,8 +209,7 @@ fn wallet_command(wallet_args: &ArgMatches) {
|
||||
} else {
|
||||
info!("Starting the Grin wallet receiving daemon...");
|
||||
let mut apis = api::ApiServer::new("/v1".to_string());
|
||||
apis.register_endpoint("/receive_coinbase".to_string(),
|
||||
wallet::WalletReceiver { key: key });
|
||||
apis.register_endpoint("/receive".to_string(), wallet::WalletReceiver { key: key });
|
||||
apis.start("127.0.0.1:13416").unwrap_or_else(|e| {
|
||||
error!("Failed to start Grin wallet receiver: {}.", e);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user