/
events.go
executable file
·55 lines (43 loc) · 1.16 KB
/
events.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package modules
import (
"github.com/palletone/go-palletone/common"
)
// TxPreEvent is posted when a transaction enters the transaction pool.
type TxPreEvent struct {
Tx *Transaction
IsOrphan bool
}
// PendingLogsEvent is posted pre mining and notifies of pending logs.
type PendingLogsEvent struct {
Logs []*Log
}
// RemovedTransactionEvent is posted when a reorg happens
type RemovedTransactionEvent struct{ Txs Transactions }
// RemovedLogsEvent is posted when a reorg happens
type RemovedLogsEvent struct{ Logs []*Log }
type ChainEvent struct {
Unit *Unit
Hash common.Hash
//Logs []*Log
}
type ChainSideEvent struct {
Unit *Unit
}
type ChainHeadEvent struct{ Unit *Unit }
// 活跃 mediators 更新事件
type ActiveMediatorsUpdatedEvent struct {
IsChanged bool // 标记活跃 mediators 是否有改变
}
//系统合约被调用,导致状态数据库改变
type SysContractStateChangeEvent struct {
ContractId []byte
WriteSet []ContractWriteSet
}
type ChainMaintenanceEvent struct {
}
type ToGroupSignEvent struct {
}
type UnstableRepositoryUpdatedEvent struct {
}
type SaveUnitEvent struct{ Unit *Unit }
type RollbackUnitEvent struct{ Unit *Unit }