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

Fix: fixed missing iota.go merges

parent 06805040
No related branches found
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ func NewBatchHasher(hashLength int, rounds int) (result *BatchHasher) {
return
}
func (this *BatchHasher) Hash(trits ternary.Trits) ternary.Trits {
return (<-this.workerPool.Submit(trits)).(ternary.Trits)
func (this *BatchHasher) Hash(trits trinary.Trits) trinary.Trits {
return (<-this.workerPool.Submit(trits)).(trinary.Trits)
}
func (this *BatchHasher) processHashes(tasks []batchworkerpool.Task) {
......@@ -36,7 +36,7 @@ func (this *BatchHasher) processHashes(tasks []batchworkerpool.Task) {
// multiplex the requests
multiplexer := ternary.NewBCTernaryMultiplexer()
for _, hashRequest := range tasks {
multiplexer.Add(hashRequest.Param(0).(ternary.Trits))
multiplexer.Add(hashRequest.Param(0).(trinary.Trits))
}
bcTrits, err := multiplexer.Extract()
if err != nil {
......@@ -56,7 +56,7 @@ func (this *BatchHasher) processHashes(tasks []batchworkerpool.Task) {
} else {
var resp = make(trinary.Trits, this.hashLength)
trits := tasks[0].Param(0).(ternary.Trits)
trits := tasks[0].Param(0).(trinary.Trits)
curl := NewCurl(this.hashLength, this.rounds)
curl.Absorb(trits, 0, len(trits))
......
......@@ -5,13 +5,13 @@ import (
"github.com/iotaledger/goshimmer/packages/model/bundle"
"github.com/iotaledger/goshimmer/packages/model/transactionmetadata"
"github.com/iotaledger/goshimmer/packages/model/value_transaction"
"github.com/iotaledger/goshimmer/packages/ternary"
"github.com/iotaledger/goshimmer/plugins/tangle"
"github.com/iotaledger/iota.go/trinary"
)
func ProcessSolidBundleHead(headTransaction *value_transaction.ValueTransaction) (*bundle.Bundle, errors.IdentifiableError) {
// only process the bundle if we didn't process it, yet
return tangle.GetBundle(headTransaction.GetHash(), func(headTransactionHash ternary.Trytes) (*bundle.Bundle, errors.IdentifiableError) {
return tangle.GetBundle(headTransaction.GetHash(), func(headTransactionHash trinary.Trytes) (*bundle.Bundle, errors.IdentifiableError) {
// abort if bundle syntax is wrong
if !headTransaction.IsHead() {
return nil, ErrProcessBundleFailed.Derive(errors.New("invalid parameter"), "transaction needs to be head of bundle")
......@@ -67,8 +67,8 @@ func ProcessSolidBundleHead(headTransaction *value_transaction.ValueTransaction)
})
}
func mapTransactionsToTransactionHashes(transactions []*value_transaction.ValueTransaction) (result []ternary.Trytes) {
result = make([]ternary.Trytes, len(transactions))
func mapTransactionsToTransactionHashes(transactions []*value_transaction.ValueTransaction) (result []trinary.Trytes) {
result = make([]trinary.Trytes, len(transactions))
for k, v := range transactions {
result[k] = v.GetHash()
}
......
......@@ -7,7 +7,6 @@ import (
"github.com/iotaledger/goshimmer/packages/node"
"github.com/iotaledger/goshimmer/packages/workerpool"
"github.com/iotaledger/goshimmer/plugins/tangle"
"github.com/iotaledger/iota.go/trinary"
)
var PLUGIN = node.NewPlugin("Bundle Processor", configure, run)
......
......@@ -9,7 +9,6 @@ import (
"github.com/iotaledger/goshimmer/packages/model/transactionmetadata"
"github.com/iotaledger/goshimmer/packages/model/value_transaction"
"github.com/iotaledger/goshimmer/packages/node"
"github.com/iotaledger/goshimmer/packages/ternary"
"github.com/iotaledger/goshimmer/packages/workerpool"
"github.com/iotaledger/goshimmer/plugins/gossip"
"github.com/iotaledger/iota.go/trinary"
......
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