From 620ccac038209077b05eb188d43accc5a6424582 Mon Sep 17 00:00:00 2001 From: eve2adam Date: Thu, 2 May 2019 13:54:12 +0900 Subject: [PATCH] [ctr/lua] bugfix for event stream when name service using --- types/receipt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/receipt.go b/types/receipt.go index 896aa7acf..551c44d1b 100644 --- a/types/receipt.go +++ b/types/receipt.go @@ -560,7 +560,6 @@ func (ev *Event) MarshalJSON() ([]byte, error) { } func (ev *Event) SetMemoryInfo(receipt *Receipt, blkHash []byte, blkNo BlockNo, txIdx int32) { - ev.ContractAddress = AddressOrigin(ev.ContractAddress) ev.TxHash = receipt.TxHash ev.TxIndex = txIdx ev.BlockHash = blkHash @@ -613,6 +612,7 @@ func (ev *Event) Filter(filter *FilterInfo, argFilter []ArgFilter) bool { } } } + ev.ContractAddress = AddressOrigin(ev.ContractAddress) return true } @@ -677,7 +677,7 @@ func (fi *FilterInfo) GetExArgFilter() ([]ArgFilter, error) { for key, value := range argMap { idx, err := strconv.ParseInt(key, 10, 32) if err != nil || idx < 0 { - return nil, errors.New("invalid argument number:" + err.Error()) + return nil, errors.New("invalid argument number:" + key) } argFilter[i].argNo = int(idx) argFilter[i].value = value