dogecoin/src/rpc
Gregory Maxwell 997a98a674 Replace FindLatestBefore used by importmuti with FindEarliestAtLeast.
In spite of the name FindLatestBefore used std::lower_bound to try
 to find the earliest block with a nTime greater or equal to the
 the requested value.  But lower_bound uses bisection and requires
 the input to be ordered with respect to the comparison operation.
 Block times are not well ordered.

I don't know what lower_bound is permitted to do when the data
 is not sufficiently ordered, but it's probably not good.
 (I could construct an implementation which would infinite loop...)

To resolve the issue this commit introduces a maximum-so-far to the
 block indexes and searches that.

For clarity the function is renamed to reflect what it actually does.

An issue that remains is that there is no grace period in importmulti:
 If a address is created at time T and a send is immediately broadcast
 and included by a miner with a slow clock there may not yet have been
 any block with at least time T.

The normal rescan has a grace period of 7200 seconds, but importmulti
 does not.
2017-01-12 14:21:43 +00:00
..
blockchain.cpp Replace FindLatestBefore used by importmuti with FindEarliestAtLeast. 2017-01-12 14:21:43 +00:00
client.cpp Add pruneblockchain RPC to enable manual block file pruning. 2017-01-10 08:14:50 -05:00
client.h rpc: Named argument support for bitcoin-cli 2017-01-10 12:04:54 +01:00
mining.cpp Merge #8811: rpc: Add support for JSON-RPC named arguments 2017-01-10 14:14:50 +01:00
misc.cpp Update RPC argument names 2017-01-10 12:04:54 +01:00
net.cpp RPC help updated 2017-01-11 22:05:23 +01:00
protocol.cpp Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
protocol.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
rawtransaction.cpp Deprecate non-txindex getrawtransaction and better warning 2017-01-11 15:34:13 -08:00
register.h Do not shadow global RPC table variable (tableRPC) 2016-08-25 15:02:26 +02:00
server.cpp rpc: Support named arguments 2017-01-05 11:30:20 +01:00
server.h rpc: Support named arguments 2017-01-05 11:30:20 +01:00