parent
1d204cd83c
commit
991b39a2b5
@ -69,10 +69,12 @@ module High_watermark = struct
|
|||||||
| Some (previous_level, previous_hash, Some signature) ->
|
| Some (previous_level, previous_hash, Some signature) ->
|
||||||
if previous_level > level then
|
if previous_level > level then
|
||||||
failwith "%s level %ld below high watermark %ld" name level previous_level
|
failwith "%s level %ld below high watermark %ld" name level previous_level
|
||||||
else if previous_level = level && previous_hash <> hash then
|
else if previous_level = level then
|
||||||
failwith "%s level %ld already signed with different data" name level
|
if previous_hash <> hash then
|
||||||
else
|
failwith "%s level %ld already signed with different data" name level
|
||||||
return (Some signature)
|
else
|
||||||
|
return (Some signature)
|
||||||
|
else return_none
|
||||||
end >>=? function
|
end >>=? function
|
||||||
| Some signature -> return signature
|
| Some signature -> return signature
|
||||||
| None ->
|
| None ->
|
||||||
|
Loading…
Reference in New Issue
Block a user