Add zero-confirmation support to webhooks (only) (#72)

This commit is contained in:
Lee *!* Clagett
2023-07-01 11:18:18 -04:00
committed by Lee *!* Clagett
parent f827dca8d1
commit fdbd3669a6
12 changed files with 408 additions and 32 deletions

View File

@@ -27,6 +27,8 @@
#include "daemon_pub.h"
#include "cryptonote_basic/cryptonote_basic.h" // monero/src
#include "rpc/daemon_zmq.h"
#include "wire/crypto.h"
#include "wire/error.h"
#include "wire/field.h"
@@ -83,5 +85,19 @@ namespace rpc
return err;
return {std::move(out)};
}
static void read_bytes(wire::json_reader& source, full_txpool_pub& self)
{
wire_read::array(source, self.txes);
}
expect<full_txpool_pub> full_txpool_pub::from_json(std::string&& source)
{
full_txpool_pub out{};
std::error_code err = wire::json::from_bytes(std::move(source), out);
if (err)
return err;
return {std::move(out)};
}
}
}