In steem-ruby, the method Steem::NetworkBroadcastApi#broadcast_transaction_synchronous was never officially available as an RPC. Early versions of AppBase provided this method and steem-ruby would pass it along, but when AppBase dropped it, it also became unavailable in steem-ruby.
Prior to this, steem-ruby didn't even need a concrete class for Steem::NetworkBroadcastApi because it is dynamically defined at runtime with all available methods.
For now, the workaround is to use Steem::CondenserApi#broadcast_transaction_synchronous, but this is not a good long-term solution.
Instead, we should actually add the concrete class called Steem::NetworkBroadcastApi with an instance method of broadcast_transaction_synchronous to simulate the desired behavior by internally polling broadcasts with Steem::TransactionStatusApi#find_transaction.
https://developers.steem.io/apidefinitions/#apidefinitions-transaction-status-api
When the new Steem::NetworkBroadcastApi#broadcast_transaction_synchronous method polls for the transaction, it should poll for within_reversible_block and include block_num in the result like Steem::CondenserApi#broadcast_transaction_synchronous currently does.
AC
In
steem-ruby, the methodSteem::NetworkBroadcastApi#broadcast_transaction_synchronouswas never officially available as an RPC. Early versions of AppBase provided this method andsteem-rubywould pass it along, but when AppBase dropped it, it also became unavailable insteem-ruby.Prior to this,
steem-rubydidn't even need a concrete class forSteem::NetworkBroadcastApibecause it is dynamically defined at runtime with all available methods.For now, the workaround is to use
Steem::CondenserApi#broadcast_transaction_synchronous, but this is not a good long-term solution.Instead, we should actually add the concrete class called
Steem::NetworkBroadcastApiwith an instance method ofbroadcast_transaction_synchronousto simulate the desired behavior by internally polling broadcasts withSteem::TransactionStatusApi#find_transaction.https://developers.steem.io/apidefinitions/#apidefinitions-transaction-status-api
When the new
Steem::NetworkBroadcastApi#broadcast_transaction_synchronousmethod polls for the transaction, it should poll forwithin_reversible_blockand includeblock_numin the result likeSteem::CondenserApi#broadcast_transaction_synchronouscurrently does.AC
lib/steem/network_broadcast_api.rbwith an instance methodbroadcast_transaction_synchronousthat handles pollingtest/steem/network_broadcast_api_test.rb