[#1437] node: Use ctx for logging
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
c16dae8b4d
commit
6db46257c0
157 changed files with 764 additions and 713 deletions
|
@ -199,7 +199,7 @@ func (c *Client) Invoke(contract util.Uint160, fee fixedn.Fixed8, method string,
|
|||
return 0, fmt.Errorf("could not invoke %s: %w", method, err)
|
||||
}
|
||||
|
||||
c.logger.Debug(logs.ClientNeoClientInvoke,
|
||||
c.logger.Debug(context.Background(), logs.ClientNeoClientInvoke,
|
||||
zap.String("method", method),
|
||||
zap.Uint32("vub", vub),
|
||||
zap.Stringer("tx_hash", txHash.Reverse()))
|
||||
|
@ -328,7 +328,7 @@ func (c *Client) TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error
|
|||
return err
|
||||
}
|
||||
|
||||
c.logger.Debug(logs.ClientNativeGasTransferInvoke,
|
||||
c.logger.Debug(context.Background(), logs.ClientNativeGasTransferInvoke,
|
||||
zap.String("to", receiver.StringLE()),
|
||||
zap.Stringer("tx_hash", txHash.Reverse()),
|
||||
zap.Uint32("vub", vub))
|
||||
|
@ -362,7 +362,7 @@ func (c *Client) BatchTransferGas(receivers []util.Uint160, amount fixedn.Fixed8
|
|||
return err
|
||||
}
|
||||
|
||||
c.logger.Debug(logs.ClientBatchGasTransferInvoke,
|
||||
c.logger.Debug(context.Background(), logs.ClientBatchGasTransferInvoke,
|
||||
zap.Strings("to", receiversLog),
|
||||
zap.Stringer("tx_hash", txHash.Reverse()),
|
||||
zap.Uint32("vub", vub))
|
||||
|
@ -389,7 +389,7 @@ func (c *Client) Wait(ctx context.Context, n uint32) error {
|
|||
|
||||
height, err = c.rpcActor.GetBlockCount()
|
||||
if err != nil {
|
||||
c.logger.Error(logs.ClientCantGetBlockchainHeight,
|
||||
c.logger.Error(context.Background(), logs.ClientCantGetBlockchainHeight,
|
||||
zap.String("error", err.Error()))
|
||||
return nil
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ func (c *Client) Wait(ctx context.Context, n uint32) error {
|
|||
|
||||
newHeight, err = c.rpcActor.GetBlockCount()
|
||||
if err != nil {
|
||||
c.logger.Error(logs.ClientCantGetBlockchainHeight243,
|
||||
c.logger.Error(context.Background(), logs.ClientCantGetBlockchainHeight243,
|
||||
zap.String("error", err.Error()))
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue