From af82884ab7c485c8b4c5ac93c308127c39c196be Mon Sep 17 00:00:00 2001 From: Daniel Kraft Date: Wed, 29 Oct 2014 18:08:31 +0100 Subject: Add "warmup mode" for RPC server. Start the RPC server before doing all the (expensive) startup initialisations like loading the block index. Until the node is ready, return all calls immediately with a new error signalling "in warmup" with an appropriate status message (similar to the init message). This is useful for RPC clients to know that the server is there (e. g., they don't have to start it) but not yet available. It is used in Namecoin and Huntercoin already for some time, and there exists a UI hooked onto the RPC interface that actively uses this to its advantage. --- src/rpcprotocol.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rpcprotocol.h') diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h index 9926daaf3d..f0d0f3445c 100644 --- a/src/rpcprotocol.h +++ b/src/rpcprotocol.h @@ -52,6 +52,7 @@ enum RPCErrorCode RPC_VERIFY_ERROR = -25, // General error during transaction or block submission RPC_VERIFY_REJECTED = -26, // Transaction or block was rejected by network rules RPC_VERIFY_ALREADY_IN_CHAIN = -27, // Transaction already in chain + RPC_IN_WARMUP = -28, // Client still warming up // Aliases for backward compatibility RPC_TRANSACTION_ERROR = RPC_VERIFY_ERROR, -- cgit v1.2.3