Skip to content

Commit c295d9c

Browse files
committed
morph: fix error from CalculateNonceAndVUB
The alphabetic key change event comes from the main chain with its hash, and when calculating vub, an error is returned because there is no hash in the FS chain. Ignore the error and calculate the value in another way. Signed-off-by: Andrey Butusov <[email protected]>
1 parent 2c1f717 commit c295d9c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Changelog for NeoFS Node
2424
- `neofs_node_engine_list_containers_time_bucket` and `neofs_node_engine_exists_time_bucket` metrics (#3014)
2525
- `neofs_node_engine_list_objects_time_bucket` metric (#3120)
2626
- The correct role parameter to invocation (#3127)
27+
- Calculation of VUB when it is impossible to get the transaction height (#3134)
2728

2829
### Changed
2930
- Number of cuncurrenly handled notifications from the chain was increased from 10 to 300 for IR (#3068)

pkg/morph/client/notary.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,12 @@ func (c *Client) CalculateNonceAndVUB(hash util.Uint256) (nonce uint32, vub uint
769769

770770
height, err := c.getTransactionHeight(conn, hash)
771771
if err != nil {
772-
return 0, 0, fmt.Errorf("could not get transaction height: %w", err)
772+
c.logger.Warn("could not get transaction height", zap.Error(err))
773+
vub, err = c.notaryTxValidationLimit(conn)
774+
if err != nil {
775+
return 0, 0, fmt.Errorf("could not get vub validation limit: %w", err)
776+
}
777+
return nonce, vub, nil
773778
}
774779

775780
return nonce, height + c.notary.txValidTime, nil

0 commit comments

Comments
 (0)