cli/server: don't spit out error if notary request already exists

It could be sent by another actor and that's OK.
This commit is contained in:
Roman Khimov 2022-04-05 17:19:56 +03:00
parent 20c0e2f2e2
commit 2c16e042cd

View file

@ -439,7 +439,8 @@ func mkP2PNotary(config network.ServerConfig, chain *core.Blockchain, serv *netw
Log: log, Log: log,
} }
n, err := notary.NewNotary(cfg, serv.Net, serv.GetNotaryPool(), func(tx *transaction.Transaction) error { n, err := notary.NewNotary(cfg, serv.Net, serv.GetNotaryPool(), func(tx *transaction.Transaction) error {
if err := serv.RelayTxn(tx); err != nil { err := serv.RelayTxn(tx)
if err != nil && !errors.Is(err, core.ErrAlreadyExists) {
return fmt.Errorf("can't relay completed notary transaction: hash %s, error: %w", tx.Hash().StringLE(), err) return fmt.Errorf("can't relay completed notary transaction: hash %s, error: %w", tx.Hash().StringLE(), err)
} }
return nil return nil