Shell: stricter fitness check on block injection
This commit is contained in:
parent
ccad901f33
commit
b1d70d576c
@ -400,7 +400,7 @@ let validate_block w ?(force = false) hash block operations =
|
|||||||
Chain.head nv.parameters.chain_state >>= fun head ->
|
Chain.head nv.parameters.chain_state >>= fun head ->
|
||||||
let head = State.Block.header head in
|
let head = State.Block.header head in
|
||||||
if
|
if
|
||||||
force || Fitness.(head.shell.fitness <= block.shell.fitness)
|
force || Fitness.(head.shell.fitness < block.shell.fitness)
|
||||||
then
|
then
|
||||||
Block_validator.validate
|
Block_validator.validate
|
||||||
~canceler:(Worker.canceler w)
|
~canceler:(Worker.canceler w)
|
||||||
|
Loading…
Reference in New Issue
Block a user