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
56d2760d
Commit
56d2760d
authored
5 years ago
by
Hans Moog
Browse files
Options
Downloads
Patches
Plain Diff
Refactor: intermediary commit (not done)
parent
bceed1c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/model/value_transaction/value_transaction.go
+1
-1
1 addition, 1 deletion
packages/model/value_transaction/value_transaction.go
packages/model/valuebundle/metabundle.go
+32
-0
32 additions, 0 deletions
packages/model/valuebundle/metabundle.go
with
33 additions
and
1 deletion
packages/model/value_transaction/value_transaction.go
+
1
−
1
View file @
56d2760d
...
...
@@ -37,7 +37,7 @@ func New() (result *ValueTransaction) {
func
FromMetaTransaction
(
metaTransaction
*
meta_transaction
.
MetaTransaction
)
*
ValueTransaction
{
return
&
ValueTransaction
{
MetaTransaction
:
metaTransaction
,
trits
:
metaTransaction
.
GetData
(),
trits
:
metaTransaction
.
GetData
(),
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/model/
meta
bundle/metabundle.go
→
packages/model/
value
bundle/metabundle.go
+
32
−
0
View file @
56d2760d
package
meta
bundle
package
value
bundle
import
(
"github.com/iotaledger/goshimmer/packages/model/
meta
_transaction"
"github.com/iotaledger/goshimmer/packages/model/
value
_transaction"
"github.com/iotaledger/goshimmer/packages/ternary"
)
...
...
@@ -10,7 +10,7 @@ type MetaBundle struct {
transactionHashes
[]
ternary
.
Trytes
}
func
New
(
transactions
[]
*
meta
_transaction
.
Meta
Transaction
)
(
result
*
MetaBundle
)
{
func
New
(
transactions
[]
*
value
_transaction
.
Value
Transaction
)
(
result
*
MetaBundle
)
{
result
=
&
MetaBundle
{
hash
:
CalculateBundleHash
(
transactions
),
}
...
...
@@ -19,13 +19,14 @@ func New(transactions []*meta_transaction.MetaTransaction) (result *MetaBundle)
}
func
(
bundle
*
MetaBundle
)
GetTransactionHashes
()
[]
ternary
.
Trytes
{
return
bundle
.
transactionHashes
}
func
(
bundle
*
MetaBundle
)
GetHash
()
{
func
(
bundle
*
MetaBundle
)
GetHash
()
ternary
.
Trytes
{
return
bundle
.
hash
}
func
CalculateBundleHash
(
transactions
[]
*
meta_transaction
.
MetaTransaction
)
ternary
.
Trytes
{
func
CalculateBundleHash
(
transactions
[]
*
value_transaction
.
ValueTransaction
)
ternary
.
Trytes
{
//transactions[0].GetData()[value_transaction.SIGNATURE_MESSAGE_FRAGMENT_OFFSET]
return
ternary
.
Trytes
(
"A"
)
}
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