[#486] innerring: Add notary support in main chain client
With `mainnet.notary_deposit=false` inner ring will ignore notary deposit \ awaiting routines in the application start, so it can run on the environments without notary support. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
dd1ace12f7
commit
bd65e41257
4 changed files with 56 additions and 16 deletions
|
@ -48,7 +48,7 @@ type (
|
|||
notaryDepositArgs struct {
|
||||
l *zap.Logger
|
||||
|
||||
depositor func() (util.Uint256, error)
|
||||
depositor func() (util.Uint256, util.Uint256, error)
|
||||
|
||||
notaryDuration uint32 // in blocks
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ func newNotaryDepositTimer(args *notaryDepositArgs) *timer.BlockTimer {
|
|||
return timer.NewBlockTimer(
|
||||
timer.StaticBlockMeter(args.notaryDuration),
|
||||
func() {
|
||||
_, err := args.depositor()
|
||||
_, _, err := args.depositor()
|
||||
if err != nil {
|
||||
args.l.Warn("can't deposit notary contract",
|
||||
zap.String("error", err.Error()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue