Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/log: change the incoming operation log #1009

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion deku-p/src/core/chain/chain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,22 @@ let incoming_vote ~current ~level ~vote chain =
apply_consensus_actions chain actions

let incoming_operation ~operation chain =
Logs.info (fun m -> m "Incoming operation: %a" Operation.Signed.pp operation);
let () =
let open Operation in
let (Signed.Signed_operation
{ initial = Initial.Initial_operation { operation; hash; _ }; _ }) =
operation
in
let hash = Operation_hash.to_b58 hash in
match operation with
| Operation_ticket_transfer _ ->
Logs.info (fun m -> m "Incoming ticket transfer: %s" hash)
| Operation_vm_transaction _ ->
Logs.info (fun m -> m "Incoming vm transaction: %s" hash)
| Operation_withdraw _ ->
Logs.info (fun m -> m "Incoming vm withdraw: %s" hash)
| Operation_noop _ -> Logs.info (fun m -> m "Incoming noop: %s" hash)
in
let (Chain ({ producer; _ } as chain)) = chain in
let producer = Producer.incoming_operation ~operation producer in
let chain = Chain { chain with producer } in
Expand Down