Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
Show First 20 Lines • Show All 372 Lines • ▼ Show 20 Lines | public: | ||||
} | } | ||||
void waitForNotifications() override { | void waitForNotifications() override { | ||||
SyncWithValidationInterfaceQueue(); | SyncWithValidationInterfaceQueue(); | ||||
} | } | ||||
std::unique_ptr<Handler> | std::unique_ptr<Handler> | ||||
handleRpc(const CRPCCommand &command) override { | handleRpc(const CRPCCommand &command) override { | ||||
return std::make_unique<RpcHandlerImpl>(command); | return std::make_unique<RpcHandlerImpl>(command); | ||||
} | } | ||||
bool rpcEnableDeprecated(const std::string &method) override { | |||||
return IsDeprecatedRPCEnabled(gArgs, method); | |||||
} | |||||
void rpcRunLater(const std::string &name, std::function<void()> fn, | |||||
int64_t seconds) override { | |||||
RPCRunLater(name, std::move(fn), seconds); | |||||
} | |||||
int rpcSerializationFlags() override { return RPCSerializationFlags(); } | |||||
void requestMempoolTransactions(Notifications ¬ifications) override { | void requestMempoolTransactions(Notifications ¬ifications) override { | ||||
LOCK2(::cs_main, ::g_mempool.cs); | LOCK2(::cs_main, ::g_mempool.cs); | ||||
for (const CTxMemPoolEntry &entry : ::g_mempool.mapTx) { | for (const CTxMemPoolEntry &entry : ::g_mempool.mapTx) { | ||||
notifications.TransactionAddedToMempool(entry.GetSharedTx()); | notifications.TransactionAddedToMempool(entry.GetSharedTx()); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
} // namespace | } // namespace | ||||
std::unique_ptr<Chain> MakeChain() { | std::unique_ptr<Chain> MakeChain() { | ||||
return std::make_unique<ChainImpl>(); | return std::make_unique<ChainImpl>(); | ||||
} | } | ||||
} // namespace interfaces | } // namespace interfaces |