Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
goshimmer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iota-imt
goshimmer
Commits
b19a815d
"dapps/valuetransfers/packages/tangle/output.go" did not exist on "aae4b1ec84f55fa75c895b364ad91f3d58ff2ee5"
Commit
b19a815d
authored
5 years ago
by
Luca Moser
Browse files
Options
Downloads
Patches
Plain Diff
fixes relay-chcker tool
parent
d08572be
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/relay-checker/main.go
+6
-9
6 additions, 9 deletions
tools/relay-checker/main.go
with
6 additions
and
9 deletions
tools/relay-checker/main.go
+
6
−
9
View file @
b19a815d
...
...
@@ -5,23 +5,21 @@ import (
"time"
client
"github.com/iotaledger/goshimmer/client"
"github.com/iotaledger/goshimmer/packages/errors"
"github.com/iotaledger/iota.go/trinary"
)
func
testBroadcastData
(
api
*
client
.
GoShimmerAPI
)
(
trinary
.
Hash
,
error
)
{
txnHash
,
err
:=
api
.
BroadcastData
(
txnAddr
,
txnData
)
if
err
!=
nil
{
return
""
,
errors
.
Wrapf
(
err
,
"B
roadcast failed
"
)
return
""
,
fmt
.
Errorf
(
"b
roadcast failed
: %w"
,
err
)
}
return
txnHash
,
nil
}
func
testTargetGetTransactions
(
api
*
client
.
GoShimmerAPI
,
txnHash
trinary
.
Hash
)
error
{
// query target node for broadcasted data
_
,
err
:=
api
.
GetTransactionObjectsByHash
([]
trinary
.
Hash
{
txnHash
})
if
err
!=
nil
{
return
errors
.
Wrapf
(
err
,
"Query target failed"
)
if
_
,
err
:=
api
.
GetTransactionObjectsByHash
([]
trinary
.
Hash
{
txnHash
});
err
!=
nil
{
return
fmt
.
Errorf
(
"querying the target node failed: %w"
,
err
)
}
return
nil
}
...
...
@@ -30,11 +28,10 @@ func testNodesGetTransactions(txnHash trinary.Hash) error {
// query nodes node for broadcasted data
for
_
,
n
:=
range
nodes
{
nodesApi
:=
client
.
NewGoShimmerAPI
(
n
)
_
,
err
:=
nodesApi
.
GetTransactionObjectsByHash
([]
trinary
.
Hash
{
txnHash
})
if
err
!=
nil
{
return
errors
.
Wrapf
(
err
,
"Query %s failed"
,
n
)
if
_
,
err
:=
nodesApi
.
GetTransactionObjectsByHash
([]
trinary
.
Hash
{
txnHash
});
err
!=
nil
{
return
fmt
.
Errorf
(
"querying node %s failed: %w"
,
n
,
err
)
}
fmt
.
Printf
(
"txn found in %s
\n
"
,
n
)
fmt
.
Printf
(
"txn found in
node
%s
\n
"
,
n
)
}
return
nil
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment