View in context in the libbitcoin Slack #general mirror.
libbitcoin-client to talk to a libbitcoin-server instance. When I send a transaction using transaction_pool_broadcast to that instance, wouldn't that bs server do an initial validation on my transaction and return any of the numerous error codes if it found a problem? If so, how can I distinguish any such error from an error caused by connectivity problems? (the connection between my application and my bs instance)(and you distinguish based on the value of the error code).
...
auto on_error = [](const bc::code& ec) {
if (bc::is_network_error(ec)) {
// network error handling
}
if (bc::is_validation_error(ec)) {
// validation error handling
}
// do on_error
};
auto on_done = [](const bc::code& ec) {
if (bc::is_network_error(ec)) {
// network error handling
}
if (bc::is_validation_error(ec)) {
// validation error handling
}
// do on_done
};
client.transaction_pool_broadcast(on_error, on_done, transaction);
...
(edited)op eval codes? Presumably any of those can happen if there's something wrong with my script?