[lbry] rpcserver: log the reason of submitblock rejection

This commit is contained in:
Roy Lee 2022-04-19 18:41:17 -07:00
parent 8c984993a8
commit 568544961f

View file

@ -3808,6 +3808,7 @@ func handleSubmitBlock(s *rpcServer, cmd interface{}, closeChan <-chan struct{})
// nodes. This will in turn relay it to the network like normal.
_, err = s.cfg.SyncMgr.SubmitBlock(block, blockchain.BFNone)
if err != nil {
rpcsLog.Infof("Rejected block %s via submitblock: %s", block.Hash(), err)
return fmt.Sprintf("rejected: %s", err.Error()), nil
}