diff --git a/node/modules/slashfilter/slashfilter.go b/node/modules/slashfilter/slashfilter.go index 22964f3..cb1643d 100644 --- a/node/modules/slashfilter/slashfilter.go +++ b/node/modules/slashfilter/slashfilter.go @@ -24,16 +24,16 @@ type mysqlSlashFilter struct { } type MinedBlock struct { - ParentEpoch int64 `gorm:"column:parent_epoch;type:bigint(20);NOT NULL"` - ParentKey string `gorm:"column:parent_key;type:varchar(2048);NOT NULL"` + ParentEpoch int64 `gorm:"column:parent_epoch;type:bigint(20);default:0;NOT NULL"` + ParentKey string `gorm:"column:parent_key;type:varchar(2048);default:'';NOT NULL"` Epoch int64 `gorm:"column:epoch;type:bigint(20);NOT NULL;primary_key"` Miner string `gorm:"column:miner;type:varchar(256);NOT NULL;primary_key"` Cid string `gorm:"column:cid;type:varchar(256);default:''"` - WinningAt time.Time `gorm:"column:winning_at;type:datetime;NOT NULL"` + WinningAt time.Time `gorm:"column:winning_at;type:datetime"` MineState StateMining `gorm:"column:mine_state;type:tinyint(4);default:0;comment:0-mining,1-success,2-timeout,3-chain forked,4-error;NOT NULL"` - Consuming int64 `gorm:"column:consuming;type:bigint(10);NOT NULL"` // reserved + Consuming int64 `gorm:"column:consuming;type:bigint(10);default:0;NOT NULL"` // reserved } func (m *MinedBlock) TableName() string {