Skip to content

Commit

Permalink
Fix rebase bug
Browse files Browse the repository at this point in the history
  • Loading branch information
anarcher committed Dec 18, 2018
1 parent d9465ac commit 522e52d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/block/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func GetBlockOperationsByTx(st *storage.LevelDBBackend, txHash string, options s
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixTxHash(txHash), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTxHash(txHash), options)

return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}
Expand All @@ -427,7 +427,7 @@ func GetBlockOperationsBySource(st *storage.LevelDBBackend, source string, optio
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixSource(source), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixSource(source), options)

return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}
Expand All @@ -446,23 +446,23 @@ func GetBlockOperationsByLinked(st *storage.LevelDBBackend, hash string, options
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixFrozenLinked(hash), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixFrozenLinked(hash), options)
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}

func GetBlockOperationsBySourceAndType(st *storage.LevelDBBackend, source string, ty operation.OperationType, options storage.ListOptions) (
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixSourceAndType(source, ty), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixSourceAndType(source, ty), options)
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}

func GetBlockOperationsByTarget(st *storage.LevelDBBackend, target string, options storage.ListOptions) (
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixTarget(target), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTarget(target), options)

return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}
Expand All @@ -471,15 +471,15 @@ func GetBlockOperationsByTargetAndType(st *storage.LevelDBBackend, target string
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixTargetAndType(target, ty), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixTargetAndType(target, ty), options)
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}

func GetBlockOperationsByPeers(st *storage.LevelDBBackend, addr string, options storage.ListOptions) (
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixPeers(addr), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixPeers(addr), options)

return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}
Expand All @@ -488,14 +488,14 @@ func GetBlockOperationsByPeersAndType(st *storage.LevelDBBackend, addr string, t
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixPeersAndType(addr, ty), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixPeersAndType(addr, ty), options)
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}

func GetBlockOperationsByBlockHeight(st *storage.LevelDBBackend, height uint64, options storage.ListOptions) (
func() (BlockOperation, bool, []byte),
func(),
) {
iterFunc, closeFunc := st.GetIterator(keyPrefixBlockHeight(height), options)
iterFunc, closeFunc := st.GetIterator(GetBlockOperationKeyPrefixBlockHeight(height), options)
return LoadBlockOperationsInsideIterator(st, iterFunc, closeFunc)
}
2 changes: 1 addition & 1 deletion lib/node/runner/api/resource/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestResourceAccount(t *testing.T) {
// Operation
{
_, tx := transaction.TestMakeTransaction([]byte{0x00}, 1)
bt := block.NewBlockTransactionFromTransaction(common.GetUniqueIDFromUUID(), 0, common.NowISO8601(), tx, 1)
bt := block.NewBlockTransactionFromTransaction(blk.Hash, blk.Height, common.NowISO8601(), tx, 1)
bt.MustSave(storage)

err := bt.SaveBlockOperations(storage)
Expand Down

0 comments on commit 522e52d

Please sign in to comment.