Skip to content
Snippets Groups Projects
Commit 56d2760d authored by Hans Moog's avatar Hans Moog
Browse files

Refactor: intermediary commit (not done)

parent bceed1c0
No related branches found
No related tags found
No related merge requests found
......@@ -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(),
}
}
......
package metabundle
package valuebundle
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.MetaTransaction) (result *MetaBundle) {
func New(transactions []*value_transaction.ValueTransaction) (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")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment