Skip to content

Commit 522e52d

Browse files
committed
Fix rebase bug
1 parent d9465ac commit 522e52d

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

lib/block/operation.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ func GetBlockOperationsByTx(st *storage.LevelDBBackend, txHash string, options s
418418
func() (BlockOperation, bool, []byte),
419419
func(),
420420
) {
421-
iterFunc, closeFunc := st.GetIterator(keyPrefixTxHash(txHash), options)
421+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTxHash(txHash), options)
422422

423423
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
424424
}
@@ -427,7 +427,7 @@ func GetBlockOperationsBySource(st *storage.LevelDBBackend, source string, optio
427427
func() (BlockOperation, bool, []byte),
428428
func(),
429429
) {
430-
iterFunc, closeFunc := st.GetIterator(keyPrefixSource(source), options)
430+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixSource(source), options)
431431

432432
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
433433
}
@@ -446,23 +446,23 @@ func GetBlockOperationsByLinked(st *storage.LevelDBBackend, hash string, options
446446
func() (BlockOperation, bool, []byte),
447447
func(),
448448
) {
449-
iterFunc, closeFunc := st.GetIterator(keyPrefixFrozenLinked(hash), options)
449+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixFrozenLinked(hash), options)
450450
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
451451
}
452452

453453
func GetBlockOperationsBySourceAndType(st *storage.LevelDBBackend, source string, ty operation.OperationType, options storage.ListOptions) (
454454
func() (BlockOperation, bool, []byte),
455455
func(),
456456
) {
457-
iterFunc, closeFunc := st.GetIterator(keyPrefixSourceAndType(source, ty), options)
457+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixSourceAndType(source, ty), options)
458458
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
459459
}
460460

461461
func GetBlockOperationsByTarget(st *storage.LevelDBBackend, target string, options storage.ListOptions) (
462462
func() (BlockOperation, bool, []byte),
463463
func(),
464464
) {
465-
iterFunc, closeFunc := st.GetIterator(keyPrefixTarget(target), options)
465+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTarget(target), options)
466466

467467
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
468468
}
@@ -471,15 +471,15 @@ func GetBlockOperationsByTargetAndType(st *storage.LevelDBBackend, target string
471471
func() (BlockOperation, bool, []byte),
472472
func(),
473473
) {
474-
iterFunc, closeFunc := st.GetIterator(keyPrefixTargetAndType(target, ty), options)
474+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTargetAndType(target, ty), options)
475475
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
476476
}
477477

478478
func GetBlockOperationsByPeers(st *storage.LevelDBBackend, addr string, options storage.ListOptions) (
479479
func() (BlockOperation, bool, []byte),
480480
func(),
481481
) {
482-
iterFunc, closeFunc := st.GetIterator(keyPrefixPeers(addr), options)
482+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixPeers(addr), options)
483483

484484
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
485485
}
@@ -488,14 +488,14 @@ func GetBlockOperationsByPeersAndType(st *storage.LevelDBBackend, addr string, t
488488
func() (BlockOperation, bool, []byte),
489489
func(),
490490
) {
491-
iterFunc, closeFunc := st.GetIterator(keyPrefixPeersAndType(addr, ty), options)
491+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixPeersAndType(addr, ty), options)
492492
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
493493
}
494494

495495
func GetBlockOperationsByBlockHeight(st *storage.LevelDBBackend, height uint64, options storage.ListOptions) (
496496
func() (BlockOperation, bool, []byte),
497497
func(),
498498
) {
499-
iterFunc, closeFunc := st.GetIterator(keyPrefixBlockHeight(height), options)
499+
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixBlockHeight(height), options)
500500
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
501501
}

lib/node/runner/api/resource/resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestResourceAccount(t *testing.T) {
7373
// Operation
7474
{
7575
_, tx := transaction.TestMakeTransaction([]byte{0x00}, 1)
76-
bt := block.NewBlockTransactionFromTransaction(common.GetUniqueIDFromUUID(), 0, common.NowISO8601(), tx, 1)
76+
bt := block.NewBlockTransactionFromTransaction(blk.Hash, blk.Height, common.NowISO8601(), tx, 1)
7777
bt.MustSave(storage)
7878

7979
err := bt.SaveBlockOperations(storage)

0 commit comments

Comments
 (0)