Merge pull request #1386 from filecoin-project/fix/replay-not-found

dont panic when replay fails to find a message
This commit is contained in:
Whyrusleeping 2020-03-10 15:52:40 -07:00 committed by GitHub
commit 61e5b05262
3 changed files with 6 additions and 2 deletions

View File

@ -102,5 +102,9 @@ func (sm *StateManager) Replay(ctx context.Context, ts *types.TipSet, mcid cid.C
return nil, nil, xerrors.Errorf("unexpected error during execution: %w", err) return nil, nil, xerrors.Errorf("unexpected error during execution: %w", err)
} }
if outr == nil {
return nil, nil, xerrors.Errorf("given message not found in tipset")
}
return outm, outr, nil return outm, outr, nil
} }

View File

@ -12,7 +12,7 @@ func SetupLogLevels() {
logging.SetLogLevel("dht", "ERROR") logging.SetLogLevel("dht", "ERROR")
logging.SetLogLevel("swarm2", "WARN") logging.SetLogLevel("swarm2", "WARN")
logging.SetLogLevel("bitswap", "WARN") logging.SetLogLevel("bitswap", "WARN")
logging.SetLogLevel("pubsub", "WARN") //logging.SetLogLevel("pubsub", "WARN")
logging.SetLogLevel("connmgr", "WARN") logging.SetLogLevel("connmgr", "WARN")
} }
} }

View File

@ -425,7 +425,7 @@ func SelectMessages(ctx context.Context, al ActorLookup, ts *types.TipSet, msgs
} }
if msg.Message.Nonce > inclNonces[from] { if msg.Message.Nonce > inclNonces[from] {
log.Warnf("message in mempool has too high of a nonce (%d > %d, from %s, inclcount %d) %s (%d pending for orig)", msg.Message.Nonce, inclNonces[from], from, inclCount[from], msg.Cid(), countFrom(msgs, from)) log.Debugf("message in mempool has too high of a nonce (%d > %d, from %s, inclcount %d) %s (%d pending for orig)", msg.Message.Nonce, inclNonces[from], from, inclCount[from], msg.Cid(), countFrom(msgs, from))
continue continue
} }