Skip to content

Commit

Permalink
Fix arguments for broadcast_transaction_synchronous and broadcast_tra…
Browse files Browse the repository at this point in the history
…nsaction_with_callback.
  • Loading branch information
afalaleev committed Sep 7, 2018
1 parent 88088b7 commit 5a21859
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/network_broadcast_api/network_broadcast_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ namespace golos {

DEFINE_API(network_broadcast_api_plugin, broadcast_transaction_synchronous) {
PLUGIN_API_VALIDATE_ARGS(
(std::string, unused) // TODO: remove in HF
(signed_transaction, trx)
(uint32_t, max_block_age, 0)
);
if (n_args >= 3) {
if (n_args >= 2) {
GOLOS_CHECK_PARAM(max_block_age, GOLOS_CHECK_VALUE(!check_max_block_age(max_block_age), "Invalid value"));
}

Expand Down Expand Up @@ -97,10 +96,11 @@ namespace golos {
DEFINE_API(network_broadcast_api_plugin,broadcast_transaction_with_callback){
// TODO: implement commit semantic for delegating connection handlers
PLUGIN_API_VALIDATE_ARGS(
(std::string, unused) // TODO: remove in HF
(signed_transaction, trx)
(uint32_t, max_block_age, 0)
);
if (n_args >= 2) {
if (n_args >= 3) {
GOLOS_CHECK_PARAM(max_block_age, GOLOS_CHECK_VALUE(!check_max_block_age(max_block_age), "Invalid value"));
}

Expand Down

0 comments on commit 5a21859

Please sign in to comment.