Skip to content
Snippets Groups Projects
Unverified Commit 47b0dd95 authored by Hans Moog's avatar Hans Moog Committed by GitHub
Browse files

Apply suggestions from code review

parent 6de83cbb
Branches
Tags
No related merge requests found
...@@ -276,7 +276,7 @@ func (transaction *Transaction) String() string { ...@@ -276,7 +276,7 @@ func (transaction *Transaction) String() string {
// max dataPayload size limit // max dataPayload size limit
const MAX_DATA_PAYLOAD_SIZE = 64 * 1024 const MAX_DATA_PAYLOAD_SIZE = 64 * 1024
// sets yhe dataPayload and its type // SetDataPayload sets yhe dataPayload and its type
func (transaction *Transaction) SetDataPayload(data []byte) error { func (transaction *Transaction) SetDataPayload(data []byte) error {
transaction.dataPayloadMutex.Lock() transaction.dataPayloadMutex.Lock()
defer transaction.dataPayloadMutex.Unlock() defer transaction.dataPayloadMutex.Unlock()
...@@ -288,7 +288,7 @@ func (transaction *Transaction) SetDataPayload(data []byte) error { ...@@ -288,7 +288,7 @@ func (transaction *Transaction) SetDataPayload(data []byte) error {
return nil return nil
} }
// gets the dataPayload and its type // GetDataPayload gets the dataPayload and its type
func (transaction *Transaction) GetDataPayload() []byte { func (transaction *Transaction) GetDataPayload() []byte {
transaction.dataPayloadMutex.RLock() transaction.dataPayloadMutex.RLock()
defer transaction.dataPayloadMutex.RUnlock() defer transaction.dataPayloadMutex.RUnlock()
...@@ -296,7 +296,7 @@ func (transaction *Transaction) GetDataPayload() []byte { ...@@ -296,7 +296,7 @@ func (transaction *Transaction) GetDataPayload() []byte {
return transaction.dataPayload return transaction.dataPayload
} }
// return size of the dataPayload as uint32 // DataPayloadSize returns the size of the dataPayload as uint32.
// nil payload as size 0 // nil payload as size 0
func (transaction *Transaction) DataPayloadSize() uint32 { func (transaction *Transaction) DataPayloadSize() uint32 {
transaction.dataPayloadMutex.RLock() transaction.dataPayloadMutex.RLock()
......
...@@ -5,6 +5,9 @@ import ( ...@@ -5,6 +5,9 @@ import (
"strings" "strings"
"testing" "testing"
"strings"
"testing"
"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address" "github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address"
"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address/signaturescheme" "github.com/iotaledger/goshimmer/packages/binary/valuetransfer/address/signaturescheme"
"github.com/iotaledger/goshimmer/packages/binary/valuetransfer/balance" "github.com/iotaledger/goshimmer/packages/binary/valuetransfer/balance"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment