diff options
author | mydesktop <dev.mc2@gmail.com> | 2014-06-11 17:32:53 -0400 |
---|---|---|
committer | mydesktop <dev.mc2@gmail.com> | 2014-06-11 17:32:53 -0400 |
commit | 75fc3e90b15df3656c9eab6a83f71934a1194786 (patch) | |
tree | 886976a7148d7421854a117b54202f49494f0097 /src/rpc | |
parent | Correcting high orphan rate of blocks at pool (diff) | |
download | monero-75fc3e90b15df3656c9eab6a83f71934a1194786.tar.xz |
Fix for orphan fix (check blocksize)
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 04ed2c687..c3f98563d 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -449,6 +449,15 @@ namespace cryptonote return false; } + // Fix from Boolberry neglects to check block + // size, do that with the function below + if(!m_core.check_incoming_block_size(blockblob)) + { + error_resp.code = CORE_RPC_ERROR_CODE_WRONG_BLOCKBLOB_SIZE; + error_resp.message = "Block bloc size is too big, rejecting block"; + return false; + } + if(!m_core.handle_block_found(b)) { error_resp.code = CORE_RPC_ERROR_CODE_BLOCK_NOT_ACCEPTED; |