don't access Result.error when not error (#4376)
* don't access Result.error when not error * correct `if` parity * other error
This commit is contained in:
parent
4b9621cd77
commit
d51d7de10b
|
@ -755,10 +755,15 @@ proc proposeBlockMEV(
|
||||||
# the block failed to validate and integrate into the DAG, which for the
|
# the block failed to validate and integrate into the DAG, which for the
|
||||||
# purpose of this return value, is equivalent. It's used to drive Beacon
|
# purpose of this return value, is equivalent. It's used to drive Beacon
|
||||||
# REST API output.
|
# REST API output.
|
||||||
|
let errMsg =
|
||||||
|
if unblindedBlockRef.isErr:
|
||||||
|
unblindedBlockRef.error
|
||||||
|
else:
|
||||||
|
"Unblinded block failed either to validate or integrate into validated store: " & unblindedBlockRef.get.error
|
||||||
warn "proposeBlockMEV: blinded block not successfully unblinded and proposed",
|
warn "proposeBlockMEV: blinded block not successfully unblinded and proposed",
|
||||||
head = shortLog(head), slot, validator_index,
|
head = shortLog(head), slot, validator_index,
|
||||||
validator = shortLog(validator),
|
validator = shortLog(validator),
|
||||||
err = unblindedBlockRef.error, blindedBlck = shortLog(blindedBlock.get)
|
err = errMsg, blindedBlck = shortLog(blindedBlock.get)
|
||||||
Opt.some head
|
Opt.some head
|
||||||
|
|
||||||
proc makeBlindedBeaconBlockForHeadAndSlot*(
|
proc makeBlindedBeaconBlockForHeadAndSlot*(
|
||||||
|
|
Loading…
Reference in New Issue