diff --git a/packages/curl/batch_hasher.go b/packages/curl/batch_hasher.go index a04ec2315c9139da51b23fc7eeb672a5148da765..8d5592a946e83bb4f0c96cc007ad8a935193132d 100644 --- a/packages/curl/batch_hasher.go +++ b/packages/curl/batch_hasher.go @@ -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)) diff --git a/plugins/bundleprocessor/bundleprocessor.go b/plugins/bundleprocessor/bundleprocessor.go index 8f49b8d5ee7c51193bf68069127551bb0f9825c6..13bef81e8764ccf3b89bfe605f4b1d627b28cfc9 100644 --- a/plugins/bundleprocessor/bundleprocessor.go +++ b/plugins/bundleprocessor/bundleprocessor.go @@ -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() } diff --git a/plugins/bundleprocessor/plugin.go b/plugins/bundleprocessor/plugin.go index 89930b024c288180112c5a305b53a0dbff2a138c..cec87804d3c1fa95ad0e51d025f1e84d1e19ad76 100644 --- a/plugins/bundleprocessor/plugin.go +++ b/plugins/bundleprocessor/plugin.go @@ -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) diff --git a/plugins/tangle/solidifier.go b/plugins/tangle/solidifier.go index f9636163acc41b843195f17f2e4a1cb32c03901a..c7ed648bf1177f40df63ef4f0b089f7a92474ac2 100644 --- a/plugins/tangle/solidifier.go +++ b/plugins/tangle/solidifier.go @@ -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"