aboutsummaryrefslogtreecommitdiff
path: root/src/rpcprotocol.h
diff options
context:
space:
mode:
authorDaniel Kraft <d@domob.eu>2014-10-29 18:08:31 +0100
committerDaniel Kraft <d@domob.eu>2014-11-04 16:01:09 +0100
commitaf82884ab7c485c8b4c5ac93c308127c39c196be (patch)
tree766428da14b53e4902c87fd3fb05a1c0d1acd87a /src/rpcprotocol.h
parentbe32b5212b6ab4460080ec5ff55e2bf882259e5e (diff)
downloadbitcoin-af82884ab7c485c8b4c5ac93c308127c39c196be.tar.xz
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.
Diffstat (limited to 'src/rpcprotocol.h')
-rw-r--r--src/rpcprotocol.h1
1 files changed, 1 insertions, 0 deletions
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,