diff options
Diffstat (limited to 'src/rpc.cpp')
| -rw-r--r-- | src/rpc.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rpc.cpp b/src/rpc.cpp index da22b1d..03d1f44 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp | |||
| @@ -253,7 +253,13 @@ static bool RebuildJob() | |||
| 253 | pool = tmp; | 253 | pool = tmp; |
| 254 | block.vtx.push_back(tx); | 254 | block.vtx.push_back(tx); |
| 255 | sz += ::GetSerializeSize(tx, SER_NETWORK); | 255 | sz += ::GetSerializeSize(tx, SER_NETWORK); |
| 256 | if (sz > MAX_SIZE / 2) break; | 256 | // Must stay under the consensus cap CheckBlock() enforces. |
| 257 | // This is the pool's job builder, so a block over the cap | ||
| 258 | // is not just one wasted solve -- it is every miner on the | ||
| 259 | // pool working a template the network will reject. The | ||
| 260 | // transaction is already pushed above, so this can overshoot | ||
| 261 | // by one; half the cap leaves room for that. | ||
| 262 | if (sz > MAX_BLOCK_SIZE / 2) break; | ||
| 257 | } | 263 | } |
| 258 | } | 264 | } |
| 259 | } | 265 | } |