@@ -16,7 +16,6 @@ package database
1616
1717import (
1818 "github.com/blinklabs-io/dingo/database/models"
19- lcommon "github.com/blinklabs-io/gouroboros/ledger/common"
2019)
2120
2221// GetAccount returns an account by staking key
@@ -37,138 +36,3 @@ func (d *Database) GetAccount(
3736 }
3837 return account , nil
3938}
40-
41- // SetDeregistration saves a deregistration certificate
42- func (d * Database ) SetDeregistration (
43- cert * lcommon.DeregistrationCertificate ,
44- slot uint64 ,
45- txn * Txn ,
46- ) error {
47- return d .metadata .SetDeregistration (
48- cert ,
49- slot ,
50- txn .Metadata (),
51- )
52- }
53-
54- // SetRegistration saves a registration certificate
55- func (d * Database ) SetRegistration (
56- cert * lcommon.RegistrationCertificate ,
57- slot , deposit uint64 ,
58- txn * Txn ,
59- ) error {
60- return d .metadata .SetRegistration (
61- cert ,
62- slot ,
63- deposit ,
64- txn .Metadata (),
65- )
66- }
67-
68- // SetStakeDelegation saves a stake delegation certificate
69- func (d * Database ) SetStakeDelegation (
70- cert * lcommon.StakeDelegationCertificate ,
71- slot uint64 ,
72- txn * Txn ,
73- ) error {
74- return d .metadata .SetStakeDelegation (
75- cert ,
76- slot ,
77- txn .Metadata (),
78- )
79- }
80-
81- // SetStakeDeregistration saves a stake deregistration certificate
82- func (d * Database ) SetStakeDeregistration (
83- cert * lcommon.StakeDeregistrationCertificate ,
84- slot uint64 ,
85- txn * Txn ,
86- ) error {
87- return d .metadata .SetStakeDeregistration (
88- cert ,
89- slot ,
90- txn .Metadata (),
91- )
92- }
93-
94- // SetStakeRegistration saves a stake registration certificate
95- func (d * Database ) SetStakeRegistration (
96- cert * lcommon.StakeRegistrationCertificate ,
97- slot , deposit uint64 ,
98- txn * Txn ,
99- ) error {
100- return d .metadata .SetStakeRegistration (
101- cert ,
102- slot ,
103- deposit ,
104- txn .Metadata (),
105- )
106- }
107-
108- // SetStakeRegistrationDelegation saves a stake registration delegation certificate
109- func (d * Database ) SetStakeRegistrationDelegation (
110- cert * lcommon.StakeRegistrationDelegationCertificate ,
111- slot , deposit uint64 ,
112- txn * Txn ,
113- ) error {
114- return d .metadata .SetStakeRegistrationDelegation (
115- cert ,
116- slot ,
117- deposit ,
118- txn .Metadata (),
119- )
120- }
121-
122- // SetStakeVoteDelegation saves a stake vote delegation certificate
123- func (d * Database ) SetStakeVoteDelegation (
124- cert * lcommon.StakeVoteDelegationCertificate ,
125- slot uint64 ,
126- txn * Txn ,
127- ) error {
128- return d .metadata .SetStakeVoteDelegation (
129- cert ,
130- slot ,
131- txn .Metadata (),
132- )
133- }
134-
135- // SetStakeVoteRegistrationDelegation saves a stake vote registration delegation certificate
136- func (d * Database ) SetStakeVoteRegistrationDelegation (
137- cert * lcommon.StakeVoteRegistrationDelegationCertificate ,
138- slot , deposit uint64 ,
139- txn * Txn ,
140- ) error {
141- return d .metadata .SetStakeVoteRegistrationDelegation (
142- cert ,
143- slot ,
144- deposit ,
145- txn .Metadata (),
146- )
147- }
148-
149- // SetVoteDelegation saves a vote delegation certificate
150- func (d * Database ) SetVoteDelegation (
151- cert * lcommon.VoteDelegationCertificate ,
152- slot uint64 ,
153- txn * Txn ,
154- ) error {
155- return d .metadata .SetVoteDelegation (
156- cert ,
157- slot ,
158- txn .Metadata (),
159- )
160- }
161-
162- // SetVoteRegistrationDelegation saves a vote registration delegation certificate
163- func (d * Database ) SetVoteRegistrationDelegation (
164- cert * lcommon.VoteRegistrationDelegationCertificate ,
165- slot , deposit uint64 ,
166- txn * Txn ,
167- ) error {
168- return d .metadata .SetVoteRegistrationDelegation (
169- cert ,
170- slot ,
171- deposit ,
172- txn .Metadata (),
173- )
174- }
0 commit comments