mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-23 14:32:32 +00:00
Modify DropAfterBlockBySha to accept a pointer.
Since all other functions take pointers, this makes the interface more consistent.
This commit is contained in:
parent
2c0dc2d862
commit
166a546078
2
db.go
2
db.go
@ -49,7 +49,7 @@ type Db interface {
|
|||||||
// the given block. It terminates any existing transaction and performs
|
// the given block. It terminates any existing transaction and performs
|
||||||
// its operations in an atomic transaction which is commited before
|
// its operations in an atomic transaction which is commited before
|
||||||
// the function returns.
|
// the function returns.
|
||||||
DropAfterBlockBySha(btcwire.ShaHash) (err error)
|
DropAfterBlockBySha(*btcwire.ShaHash) (err error)
|
||||||
|
|
||||||
// ExistsSha returns whether or not the given block hash is present in
|
// ExistsSha returns whether or not the given block hash is present in
|
||||||
// the database.
|
// the database.
|
||||||
|
@ -468,7 +468,7 @@ func (db *SqliteDb) rePlayTransaction() (err error) {
|
|||||||
// DropAfterBlockBySha will remove any blocks from the database after the given block.
|
// DropAfterBlockBySha will remove any blocks from the database after the given block.
|
||||||
// It terminates any existing transaction and performs its operations in an
|
// It terminates any existing transaction and performs its operations in an
|
||||||
// atomic transaction, it is terminated (committed) before exit.
|
// atomic transaction, it is terminated (committed) before exit.
|
||||||
func (db *SqliteDb) DropAfterBlockBySha(sha btcwire.ShaHash) (err error) {
|
func (db *SqliteDb) DropAfterBlockBySha(sha *btcwire.ShaHash) (err error) {
|
||||||
var row *sql.Row
|
var row *sql.Row
|
||||||
db.dbLock.Lock()
|
db.dbLock.Lock()
|
||||||
defer db.dbLock.Unlock()
|
defer db.dbLock.Unlock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user