RPC: sending 0 amount is invalid with state blocks
This commit is contained in:
parent
7369b3a9db
commit
99f3221bc6
1 changed files with 5 additions and 0 deletions
|
@ -2762,6 +2762,11 @@ void rai::rpc_handler::send ()
|
|||
rpc_control_impl ();
|
||||
auto wallet (wallet_impl ());
|
||||
auto amount (amount_impl ());
|
||||
// Sending 0 amount is invalid with state blocks
|
||||
if (!ec && amount.is_zero ())
|
||||
{
|
||||
ec = nano::error_common::invalid_amount;
|
||||
}
|
||||
if (!ec)
|
||||
{
|
||||
std::string source_text (request.get<std::string> ("source"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue