Fix event log of claimIScore
revision < 9  IScoreClaimed(int,int)
revision >= 9 IScoreClaimedV2(Address,int,int)
@@ -632,6 +632,18 @@ func (s *chainScore) Ex_claimIScore() error {
}
func (s *chainScore) claimEventLog(address module.Address, claim *big.Int, icx *big.Int) {
+ revision := s.cc.Revision().Value()
+ if revision < icmodule.Revision9 {
+ s.cc.OnEvent(state.SystemAddress,
+ [][]byte{
+ []byte("IScoreClaimed(int,int)"),
+ },
+ [][]byte{
+ intconv.BigIntToBytes(claim),
+ intconv.BigIntToBytes(icx),
+ },
+ )
+ } else {
s.cc.OnEvent(state.SystemAddress,
[][]byte{
[]byte("IScoreClaimedV2(Address,int,int)"),
@@ -643,6 +655,7 @@ func (s *chainScore) claimEventLog(address module.Address, claim *big.Int, icx *
},
)
}
+}
func (s *chainScore) Ex_queryIScore(address module.Address) (map[string]interface{}, error) {
if err := s.tryChargeCall(true); err != nil {
