Skip to content

Commit

Permalink
add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
giskook committed Jul 2, 2024
1 parent 17598b6 commit c4c802f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions jsonrpc/endpoints_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (e *EthEndpoints) Call(arg *types.TxArgs, blockArg *types.BlockNumberOrHash

// X Layer LRU
if lru_xlayer.GetConfig().Enable {
log.Infof("LRU cache is enabled")
ret, errValue, ok := getCallResultFromLRU(blockToProcess, sender, tx)
if ok {
log.Infof("Call result from LRU cache: %v, %v", ret, errValue)
Expand Down
1 change: 1 addition & 0 deletions jsonrpc/endpoints_eth_lru_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func getCallResultFromLRU(blockNumber *uint64, sender common.Address, tx *ethtyp

func setCallResultToLRU(blockNumber *uint64, sender common.Address, tx *ethtypes.Transaction, value interface{}, errValue types.Error) {
retKey, errKey := getCallKey(blockNumber, sender, tx)
log.Infof("setCallResultToLRU retKey: %s, errKey: %s", retKey, errKey)
err := lru_xlayer.GetLRU().Set(retKey, value)
if err != nil {
log.Debugf("Failed to set value to LRU cache call ret: %v", err)
Expand Down

0 comments on commit c4c802f

Please sign in to comment.