Proto/alpha: use two operations list (endorsement / others)
This commit is contained in:
parent
a1122f2083
commit
d8151c0d00
@ -18,7 +18,8 @@ let max_block_length =
|
||||
Tezos_context.Block_header.max_header_length
|
||||
|
||||
let validation_passes =
|
||||
[ Updater.{ max_size = 1024 * 1024 ; max_op = None } ] (* 1MB *)
|
||||
Updater.[ { max_size = 32 * 1024 ; max_op = None } ; (* 32kB FIXME *)
|
||||
{ max_size = 1024 * 1024 ; max_op = None } ] (* 1MB *)
|
||||
|
||||
let rpc_services = Services_registration.rpc_services
|
||||
|
||||
|
@ -362,7 +362,20 @@ let parse hash (op: Operation.t) =
|
||||
ok { hash ; shell = op.shell ; contents ; signature }
|
||||
| None -> error Cannot_parse_operation
|
||||
|
||||
let acceptable_passes _op = [0]
|
||||
let acceptable_passes op =
|
||||
match op.contents with
|
||||
| Anonymous_operations _
|
||||
| Sourced_operations (Manager_operations _) -> [1]
|
||||
| Sourced_operations (Delegate_operations { operations ; _ }) ->
|
||||
let is_endorsement = function Endorsement _ -> true | _ -> false in
|
||||
if List.exists is_endorsement operations then
|
||||
if List.for_all is_endorsement operations then
|
||||
[0]
|
||||
else
|
||||
[]
|
||||
else
|
||||
[1]
|
||||
| Sourced_operations (Dictator_operation _) -> [0]
|
||||
|
||||
type error += Invalid_signature (* `Permanent *)
|
||||
type error += Missing_signature (* `Permanent *)
|
||||
|
Loading…
Reference in New Issue
Block a user