forked from TrueCloudLab/frostfs-node
[#184] node, ir: Do not wait for already made notary deposits
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
parent
3646723ae3
commit
ba58a77f8c
2 changed files with 16 additions and 0 deletions
|
@ -117,6 +117,14 @@ func makeAndWaitNotaryDeposit(c *cfg) {
|
||||||
tx, err := makeNotaryDeposit(c)
|
tx, err := makeNotaryDeposit(c)
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
|
|
||||||
|
if tx.Equals(util.Uint256{}) {
|
||||||
|
// non-error deposit with an empty TX hash means
|
||||||
|
// that the deposit has already been made; no
|
||||||
|
// need to wait it.
|
||||||
|
c.log.Info("notary deposit has already been made")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
err = waitNotaryDeposit(c, tx)
|
err = waitNotaryDeposit(c, tx)
|
||||||
fatalOnErr(err)
|
fatalOnErr(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,14 @@ func (s *Server) initNotary(ctx context.Context, deposit depositor, await awaite
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if tx.Equals(util.Uint256{}) {
|
||||||
|
// non-error deposit with an empty TX hash means
|
||||||
|
// that the deposit has already been made; no
|
||||||
|
// need to wait it.
|
||||||
|
s.log.Info("notary deposit has already been made")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
s.log.Info(msg)
|
s.log.Info(msg)
|
||||||
|
|
||||||
return await(ctx, tx)
|
return await(ctx, tx)
|
||||||
|
|
Loading…
Reference in a new issue