Rename topic to topics #544
This commit is contained in:
		@@ -215,7 +215,7 @@ type FilterWhisperRes struct {
 | 
			
		||||
 | 
			
		||||
type LogRes struct {
 | 
			
		||||
	Address string   `json:"address"`
 | 
			
		||||
	Topic   []string `json:"topic"`
 | 
			
		||||
	Topics  []string `json:"topics"`
 | 
			
		||||
	Data    string   `json:"data"`
 | 
			
		||||
	Number  uint64   `json:"number"`
 | 
			
		||||
}
 | 
			
		||||
@@ -225,12 +225,12 @@ func NewLogsRes(logs state.Logs) (ls []LogRes) {
 | 
			
		||||
 | 
			
		||||
	for i, log := range logs {
 | 
			
		||||
		var l LogRes
 | 
			
		||||
		l.Topic = make([]string, len(log.Topics()))
 | 
			
		||||
		l.Topics = make([]string, len(log.Topics()))
 | 
			
		||||
		l.Address = common.ToHex(log.Address())
 | 
			
		||||
		l.Data = common.ToHex(log.Data())
 | 
			
		||||
		l.Number = log.Number()
 | 
			
		||||
		for j, topic := range log.Topics() {
 | 
			
		||||
			l.Topic[j] = common.ToHex(topic)
 | 
			
		||||
			l.Topics[j] = common.ToHex(topic)
 | 
			
		||||
		}
 | 
			
		||||
		ls[i] = l
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user