From 172593226a3b3dc621df0f8a34fcafa8b361f9f6 Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Fri, 12 Jul 2024 12:18:50 +0530 Subject: [PATCH] fixed the pledge period variable --- core/transfer.go | 3 +-- core/unpledge/unpledge.go | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/core/transfer.go b/core/transfer.go index ab84a43b..1490a8d8 100644 --- a/core/transfer.go +++ b/core/transfer.go @@ -8,7 +8,6 @@ import ( "github.com/rubixchain/rubixgoplatform/contract" "github.com/rubixchain/rubixgoplatform/core/model" - "github.com/rubixchain/rubixgoplatform/core/unpledge" "github.com/rubixchain/rubixgoplatform/core/wallet" "github.com/rubixchain/rubixgoplatform/did" "github.com/rubixchain/rubixgoplatform/wrapper/uuid" @@ -101,7 +100,7 @@ func gatherTokensForTransaction(c *Core, req *model.RBTTransferRequest, dc did.D return nil, fmt.Errorf("failed to get transaction details for trx hash: %v, err: %v", token.TransactionID, err) } - if time.Now().Unix() - tokenTransactionDetail.Epoch > int64(unpledge.PledgePeriodInSeconds) { + if time.Now().Unix() - tokenTransactionDetail.Epoch > int64(pledgePeriodInSeconds) { if err := c.w.LockToken(&token); err != nil { return nil, fmt.Errorf("failed to lock tokens %v, exiting selfTransfer routine with error: %v", token.TokenID, err.Error()) } diff --git a/core/unpledge/unpledge.go b/core/unpledge/unpledge.go index 9cdc4448..63fd8134 100644 --- a/core/unpledge/unpledge.go +++ b/core/unpledge/unpledge.go @@ -9,8 +9,6 @@ import ( ) const ( - PledgePeriodInSeconds int = 7 * 24 * 60 * 60 - UnpledgeQueueTable string = "unpledgequeue" )