Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ledger/byron/byron.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,9 @@ func NewByronTransactionFromCbor(data []byte) (*ByronTransaction, error) {
return &byronTx, nil
}

func NewByronTransactionOutputFromCbor(data []byte) (*ByronTransactionOutput, error) {
func NewByronTransactionOutputFromCbor(
data []byte,
) (*ByronTransactionOutput, error) {
var byronTxOutput ByronTransactionOutput
if _, err := cbor.Decode(data, &byronTxOutput); err != nil {
return nil, fmt.Errorf("decode Byron transaction output error: %w", err)
Expand Down
5 changes: 4 additions & 1 deletion ledger/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func TestDetermineTransactionType(t *testing.T) {
}
tmpTxType, err := ledger.DetermineTransactionType(txCbor)
if err != nil {
t.Fatalf("DetermineTransactionType failed with an unexpected error: %s", err)
t.Fatalf(
"DetermineTransactionType failed with an unexpected error: %s",
err,
)
}
if tmpTxType != testDef.expectedTxType {
t.Fatalf(
Expand Down
4 changes: 3 additions & 1 deletion protocol/chainsync/messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ func TestMsgRollForwardNodeToNode_CorruptedCBOR(t *testing.T) {
)

if err == nil {
t.Fatalf("expected error from NewMsgRollForwardNtN with corrupted CBOR, got nil")
t.Fatalf(
"expected error from NewMsgRollForwardNtN with corrupted CBOR, got nil",
)
}
}
func TestMsgRollForwardNodeToClient(t *testing.T) {
Expand Down
5 changes: 4 additions & 1 deletion protocol/chainsync/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ func NewWrappedHeader(
// Parse block and extract header
tmp := []cbor.RawMessage{}
if _, err := cbor.Decode(blockCbor, &tmp); err != nil {
return nil, fmt.Errorf("CBOR decode failed in NewWrappedHeader: %w", err)
return nil, fmt.Errorf(
"CBOR decode failed in NewWrappedHeader: %w",
err,
)
}
if len(tmp) == 0 {
return nil, errors.New("decoded CBOR header is empty")
Expand Down
Loading