Skip to content

Commit 9fc700b

Browse files
committed
Merge branch 'dev'
2 parents 01b6740 + 29ec9f3 commit 9fc700b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.27
1+
2.7.0

database/db.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ CREATE INDEX stakes_validator_id_index ON stakes USING btree (validator_id);
221221

222222
CREATE TABLE unbonds
223223
(
224-
block_id bigint NOT NULL references blocks (id),
224+
block_id bigint NOT NULL,
225225
address_id bigint NOT NULL references addresses (id),
226226
coin_id integer NOT NULL references coins (id),
227227
validator_id integer NOT NULL references validators (id),

validator/service.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import (
1717
"time"
1818
)
1919

20+
const UnbondBlockCount = 518400
21+
2022
type Service struct {
2123
env *env.ExtenderEnvironment
2224
nodeApi *grpc_client.Client
@@ -80,7 +82,7 @@ func (s *Service) UnbondSaverWorker(data <-chan *models.Transaction) {
8082
}
8183

8284
unbond := &models.Unbond{
83-
BlockId: uint(tx.BlockID),
85+
BlockId: uint(tx.BlockID + UnbondBlockCount),
8486
AddressId: uint(tx.FromAddressID),
8587
CoinId: uint(txData.Coin.Id),
8688
ValidatorId: vId,

0 commit comments

Comments
 (0)