Add bughunt Error log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-10-13 01:18:32 +02:00
parent 084d68a6b3
commit e11deb9551
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -97,7 +97,13 @@ func (m *Miner) scheduleNextPost(ppe uint64) {
} }
func (m *Miner) computePost(ppe uint64) func(ts *types.TipSet, curH uint64) error { func (m *Miner) computePost(ppe uint64) func(ts *types.TipSet, curH uint64) error {
called := 0
return func(ts *types.TipSet, curH uint64) error { return func(ts *types.TipSet, curH uint64) error {
if called > 0 {
log.Errorw("BUG: computePost callback called again", "ppe", ppe,
"height", ts.Height(), "curH", curH, "called", called)
}
called++
ctx := context.TODO() ctx := context.TODO()