Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
441d5a2c
Unverified
Commit
441d5a2c
authored
May 27, 2021
by
Ralph Pichler
Committed by
GitHub
May 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: move transaction out of swap package (#1818)
parent
bd995d87
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
39 additions
and
39 deletions
+39
-39
chain.go
pkg/node/chain.go
+1
-1
node.go
pkg/node/node.go
+1
-1
listener.go
pkg/postage/listener/listener.go
+1
-1
contract.go
pkg/postage/postagecontract/contract.go
+1
-1
contract_test.go
pkg/postage/postagecontract/contract_test.go
+2
-2
cashout.go
pkg/settlement/swap/chequebook/cashout.go
+1
-1
cashout_test.go
pkg/settlement/swap/chequebook/cashout_test.go
+3
-3
chequebook.go
pkg/settlement/swap/chequebook/chequebook.go
+1
-1
chequebook_test.go
pkg/settlement/swap/chequebook/chequebook_test.go
+2
-2
chequestore.go
pkg/settlement/swap/chequebook/chequestore.go
+1
-1
chequestore_test.go
pkg/settlement/swap/chequebook/chequestore_test.go
+1
-1
contract.go
pkg/settlement/swap/chequebook/contract.go
+1
-1
factory.go
pkg/settlement/swap/chequebook/factory.go
+1
-1
factory_test.go
pkg/settlement/swap/chequebook/factory_test.go
+3
-3
init.go
pkg/settlement/swap/chequebook/init.go
+1
-1
erc20.go
pkg/settlement/swap/erc20/erc20.go
+1
-1
erc20_test.go
pkg/settlement/swap/erc20/erc20_test.go
+3
-3
backend.go
pkg/transaction/backend.go
+0
-0
backend_test.go
pkg/transaction/backend_test.go
+2
-2
backend.go
pkg/transaction/backendmock/backend.go
+1
-1
backend.go
pkg/transaction/backendsimulation/backend.go
+1
-1
event.go
pkg/transaction/event.go
+0
-0
event_test.go
pkg/transaction/event_test.go
+1
-1
export_test.go
pkg/transaction/export_test.go
+0
-0
transaction.go
pkg/transaction/mock/transaction.go
+1
-1
monitor.go
pkg/transaction/monitor.go
+0
-0
monitor_test.go
pkg/transaction/monitor_test.go
+2
-2
monitor.go
pkg/transaction/monitormock/monitor.go
+1
-1
sender_matcher.go
pkg/transaction/sender_matcher.go
+0
-0
sender_matcher_test.go
pkg/transaction/sender_matcher_test.go
+2
-2
transaction.go
pkg/transaction/transaction.go
+0
-0
transaction_test.go
pkg/transaction/transaction_test.go
+3
-3
No files found.
pkg/node/chain.go
View file @
441d5a2c
...
...
@@ -21,8 +21,8 @@ import (
"github.com/ethersphere/bee/pkg/settlement/swap"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
"github.com/ethersphere/bee/pkg/settlement/swap/swapprotocol"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/storage"
"github.com/ethersphere/bee/pkg/transaction"
)
const
(
...
...
pkg/node/node.go
View file @
441d5a2c
...
...
@@ -61,7 +61,6 @@ import (
"github.com/ethersphere/bee/pkg/settlement/pseudosettle"
"github.com/ethersphere/bee/pkg/settlement/swap"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/shed"
"github.com/ethersphere/bee/pkg/steward"
"github.com/ethersphere/bee/pkg/storage"
...
...
@@ -70,6 +69,7 @@ import (
"github.com/ethersphere/bee/pkg/topology/kademlia"
"github.com/ethersphere/bee/pkg/topology/lightnode"
"github.com/ethersphere/bee/pkg/tracing"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/traversal"
"github.com/hashicorp/go-multierror"
ma
"github.com/multiformats/go-multiaddr"
...
...
pkg/postage/listener/listener.go
View file @
441d5a2c
...
...
@@ -20,7 +20,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/postage"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-storage-incentives-abi/postageabi"
"github.com/prometheus/client_golang/prometheus"
)
...
...
pkg/postage/postagecontract/contract.go
View file @
441d5a2c
...
...
@@ -17,7 +17,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/postage"
"github.com/ethersphere/bee/pkg/sctx"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-storage-incentives-abi/postageabi"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/postage/postagecontract/contract_test.go
View file @
441d5a2c
...
...
@@ -16,8 +16,8 @@ import (
"github.com/ethereum/go-ethereum/core/types"
postageMock
"github.com/ethersphere/bee/pkg/postage/mock"
"github.com/ethersphere/bee/pkg/postage/postagecontract"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
transactionMock
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/mock"
"github.com/ethersphere/bee/pkg/transaction"
transactionMock
"github.com/ethersphere/bee/pkg/transaction/mock"
)
func
TestCreateBatch
(
t
*
testing
.
T
)
{
...
...
pkg/settlement/swap/chequebook/cashout.go
View file @
441d5a2c
...
...
@@ -15,8 +15,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/sctx"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/storage"
"github.com/ethersphere/bee/pkg/transaction"
)
var
(
...
...
pkg/settlement/swap/chequebook/cashout_test.go
View file @
441d5a2c
...
...
@@ -13,10 +13,10 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
chequestoremock
"github.com/ethersphere/bee/pkg/settlement/swap/chequestore/mock"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/mock"
storemock
"github.com/ethersphere/bee/pkg/statestore/mock"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/transaction/mock"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/settlement/swap/chequebook/chequebook.go
View file @
441d5a2c
...
...
@@ -15,8 +15,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/sctx"
"github.com/ethersphere/bee/pkg/settlement/swap/erc20"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/storage"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/settlement/swap/chequebook/chequebook_test.go
View file @
441d5a2c
...
...
@@ -15,9 +15,9 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
erc20mock
"github.com/ethersphere/bee/pkg/settlement/swap/erc20/mock"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
transactionmock
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/mock"
storemock
"github.com/ethersphere/bee/pkg/statestore/mock"
"github.com/ethersphere/bee/pkg/transaction"
transactionmock
"github.com/ethersphere/bee/pkg/transaction/mock"
)
func
TestChequebookAddress
(
t
*
testing
.
T
)
{
...
...
pkg/settlement/swap/chequebook/chequestore.go
View file @
441d5a2c
...
...
@@ -14,8 +14,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/crypto"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/storage"
"github.com/ethersphere/bee/pkg/transaction"
)
var
(
...
...
pkg/settlement/swap/chequebook/chequestore_test.go
View file @
441d5a2c
...
...
@@ -12,8 +12,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
transactionmock
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/mock"
storemock
"github.com/ethersphere/bee/pkg/statestore/mock"
transactionmock
"github.com/ethersphere/bee/pkg/transaction/mock"
)
func
TestReceiveCheque
(
t
*
testing
.
T
)
{
...
...
pkg/settlement/swap/chequebook/contract.go
View file @
441d5a2c
...
...
@@ -10,7 +10,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
)
type
chequebookContract
struct
{
...
...
pkg/settlement/swap/chequebook/factory.go
View file @
441d5a2c
...
...
@@ -13,7 +13,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/sctx"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-sw3-abi/sw3abi"
"golang.org/x/net/context"
)
...
...
pkg/settlement/swap/chequebook/factory_test.go
View file @
441d5a2c
...
...
@@ -14,9 +14,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/settlement/swap/chequebook"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/mock"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/transaction/mock"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/settlement/swap/chequebook/init.go
View file @
441d5a2c
...
...
@@ -14,8 +14,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/settlement/swap/erc20"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/storage"
"github.com/ethersphere/bee/pkg/transaction"
)
const
(
...
...
pkg/settlement/swap/erc20/erc20.go
View file @
441d5a2c
...
...
@@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/sctx"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/settlement/swap/erc20/erc20_test.go
View file @
441d5a2c
...
...
@@ -11,9 +11,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethersphere/bee/pkg/settlement/swap/erc20"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
backendmock
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/mock"
"github.com/ethersphere/bee/pkg/transaction"
backendmock
"github.com/ethersphere/bee/pkg/transaction/backendmock"
transactionmock
"github.com/ethersphere/bee/pkg/transaction/mock"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/
settlement/swap/
transaction/backend.go
→
pkg/transaction/backend.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/backend_test.go
→
pkg/transaction/backend_test.go
View file @
441d5a2c
...
...
@@ -8,8 +8,8 @@ import (
"time"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/backendmock"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendmock"
)
func
TestIsSynced
(
t
*
testing
.
T
)
{
...
...
pkg/
settlement/swap/
transaction/backendmock/backend.go
→
pkg/transaction/backendmock/backend.go
View file @
441d5a2c
...
...
@@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
)
type
backendMock
struct
{
...
...
pkg/
settlement/swap/
transaction/backendsimulation/backend.go
→
pkg/transaction/backendsimulation/backend.go
View file @
441d5a2c
...
...
@@ -12,7 +12,7 @@ import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
)
type
AccountAtKey
struct
{
...
...
pkg/
settlement/swap/
transaction/event.go
→
pkg/transaction/event.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/event_test.go
→
pkg/transaction/event_test.go
View file @
441d5a2c
...
...
@@ -11,7 +11,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/go-sw3-abi/sw3abi"
)
...
...
pkg/
settlement/swap/
transaction/export_test.go
→
pkg/transaction/export_test.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/mock/transaction.go
→
pkg/transaction/mock/transaction.go
View file @
441d5a2c
...
...
@@ -14,7 +14,7 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
)
type
transactionServiceMock
struct
{
...
...
pkg/
settlement/swap/
transaction/monitor.go
→
pkg/transaction/monitor.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/monitor_test.go
→
pkg/transaction/monitor_test.go
View file @
441d5a2c
...
...
@@ -13,8 +13,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction/backendsimulation"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendsimulation"
)
func
TestMonitorWatchTransaction
(
t
*
testing
.
T
)
{
...
...
pkg/
settlement/swap/
transaction/monitormock/monitor.go
→
pkg/transaction/monitormock/monitor.go
View file @
441d5a2c
...
...
@@ -9,7 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/
settlement/swap/
transaction"
"github.com/ethersphere/bee/pkg/transaction"
)
type
transactionMonitorMock
struct
{
...
...
pkg/
settlement/swap/
transaction/sender_matcher.go
→
pkg/transaction/sender_matcher.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/sender_matcher_test.go
→
pkg/transaction/sender_matcher_test.go
View file @
441d5a2c
...
...
@@ -9,9 +9,9 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/crypto"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/backendmock"
"github.com/ethersphere/bee/pkg/swarm"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendmock"
)
func
TestMatchesSender
(
t
*
testing
.
T
)
{
...
...
pkg/
settlement/swap/
transaction/transaction.go
→
pkg/transaction/transaction.go
View file @
441d5a2c
File moved
pkg/
settlement/swap/
transaction/transaction_test.go
→
pkg/transaction/transaction_test.go
View file @
441d5a2c
...
...
@@ -18,10 +18,10 @@ import (
"github.com/ethersphere/bee/pkg/crypto"
signermock
"github.com/ethersphere/bee/pkg/crypto/mock"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/backendmock"
"github.com/ethersphere/bee/pkg/settlement/swap/transaction/monitormock"
storemock
"github.com/ethersphere/bee/pkg/statestore/mock"
"github.com/ethersphere/bee/pkg/transaction"
"github.com/ethersphere/bee/pkg/transaction/backendmock"
"github.com/ethersphere/bee/pkg/transaction/monitormock"
)
func
nonceKey
(
sender
common
.
Address
)
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment