aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/vm/oracle_contracts.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/core/vm/oracle_contracts.go b/core/vm/oracle_contracts.go
index c82fed3cf..1fa66cefb 100644
--- a/core/vm/oracle_contracts.go
+++ b/core/vm/oracle_contracts.go
@@ -1109,7 +1109,7 @@ func (s *GovernanceState) emitConfigurationChangedEvent() {
})
}
-// event CRSProposed(uint256 round, bytes32 crs);
+// event CRSProposed(uint256 indexed Round, bytes32 CRS);
func (s *GovernanceState) emitCRSProposed(round *big.Int, crs common.Hash) {
s.StateDB.AddLog(&types.Log{
Address: GovernanceContractAddress,
@@ -1182,28 +1182,37 @@ func (s *GovernanceState) emitNodeRemoved(nodeAddr common.Address) {
})
}
-// event ForkReported(address indexed NodeAddress, address indexed Type, bytes Arg1, bytes Arg2);
+// event Reported(address indexed NodeAddress, uint256 Type, bytes Arg1, bytes Arg2);
func (s *GovernanceState) emitReported(nodeAddr common.Address, reportType *big.Int, arg1, arg2 []byte) {
- t, err := abi.NewType("bytes", nil)
+ t1, err := abi.NewType("uint256", nil)
+ if err != nil {
+ panic(err)
+ }
+ t2, err := abi.NewType("bytes", nil)
if err != nil {
panic(err)
}
arg := abi.Arguments{
abi.Argument{
+ Name: "ReportType",
+ Type: t1,
+ Indexed: false,
+ },
+ abi.Argument{
Name: "Arg1",
- Type: t,
+ Type: t2,
Indexed: false,
},
abi.Argument{
Name: "Arg2",
- Type: t,
+ Type: t2,
Indexed: false,
},
}
- data, err := arg.Pack(arg1, arg2)
+ data, err := arg.Pack(reportType, arg1, arg2)
if err != nil {
panic(err)
}