File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ type Deregistration struct {
6161 ID uint `gorm:"primarykey"`
6262 CertificateID uint `gorm:"index"`
6363 AddedSlot uint64
64+ Amount int64
6465}
6566
6667func (Deregistration ) TableName () string {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ package sqlite
1616
1717import (
1818 "errors"
19+ "fmt"
1920
2021 "github.com/blinklabs-io/dingo/database/models"
2122 lcommon "github.com/blinklabs-io/gouroboros/ledger/common"
@@ -80,7 +81,7 @@ func (d *MetadataStoreSqlite) SetDeregistration(
8081 stakeKey := cert .StakeCredential .Credential .Bytes ()
8182 tmpAccount , err := d .GetAccount (stakeKey , txn )
8283 if err != nil {
83- return err
84+ return fmt . Errorf ( "failed getting account: %w" , err )
8485 }
8586 if tmpAccount == nil {
8687 // Account not found, nothing to deregister
@@ -89,6 +90,7 @@ func (d *MetadataStoreSqlite) SetDeregistration(
8990 tmpItem := models.Deregistration {
9091 StakingKey : stakeKey ,
9192 AddedSlot : slot ,
93+ Amount : cert .Amount ,
9294 }
9395 tmpAccount .Active = false
9496 if txn != nil {
You can’t perform that action at this time.
0 commit comments