diff --git a/configuration/configuration.go b/configuration/configuration.go index 60c1da8..c56e5ae 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -86,7 +86,7 @@ const ( SkipAdminEnv = "SKIP_ADMIN" // MiddlewareVersion is the version of rosetta-klaytn. - MiddlewareVersion = "1.0.4" + MiddlewareVersion = "1.0.5" ) // Configuration determines how diff --git a/integration/data_api_block_test.go b/integration/data_api_block_test.go index 4eca6d8..f700a2b 100644 --- a/integration/data_api_block_test.go +++ b/integration/data_api_block_test.go @@ -50,22 +50,17 @@ func TestBlock(t *testing.T) { continue } assert.Equal(t, ret.Block.Transactions[i].TransactionIdentifier.Hash, testTxHash) - assert.Equal(t, 5, len(ret.Block.Transactions[i].Operations)) + assert.Equal(t, 4, len(ret.Block.Transactions[i].Operations)) assert.Equal(t, klaytn.FeeOpType, ret.Block.Transactions[i].Operations[0].Type) assert.Equal(t, klaytn.FeeOpType, ret.Block.Transactions[i].Operations[1].Type) - assert.Equal(t, klaytn.FeeOpType, ret.Block.Transactions[i].Operations[2].Type) assert.Equal(t, int64(0), ret.Block.Transactions[i].Operations[0].OperationIdentifier.Index) assert.Equal(t, int64(1), ret.Block.Transactions[i].Operations[1].OperationIdentifier.Index) - assert.Equal(t, int64(2), ret.Block.Transactions[i].Operations[2].OperationIdentifier.Index) - assert.Equal(t, 2, len(ret.Block.Transactions[i].Operations[2].RelatedOperations)) - assert.Equal(t, int64(0), ret.Block.Transactions[i].Operations[2].RelatedOperations[0].Index) - assert.Equal(t, int64(1), ret.Block.Transactions[i].Operations[2].RelatedOperations[1].Index) + assert.Equal(t, klaytn.CallOpType, ret.Block.Transactions[i].Operations[2].Type) assert.Equal(t, klaytn.CallOpType, ret.Block.Transactions[i].Operations[3].Type) - assert.Equal(t, klaytn.CallOpType, ret.Block.Transactions[i].Operations[4].Type) + assert.Equal(t, int64(2), ret.Block.Transactions[i].Operations[2].OperationIdentifier.Index) assert.Equal(t, int64(3), ret.Block.Transactions[i].Operations[3].OperationIdentifier.Index) - assert.Equal(t, int64(4), ret.Block.Transactions[i].Operations[4].OperationIdentifier.Index) - assert.Equal(t, 1, len(ret.Block.Transactions[i].Operations[4].RelatedOperations)) - assert.Equal(t, int64(3), ret.Block.Transactions[i].Operations[4].RelatedOperations[0].Index) + assert.Equal(t, 1, len(ret.Block.Transactions[i].Operations[3].RelatedOperations)) + assert.Equal(t, int64(2), ret.Block.Transactions[i].Operations[3].RelatedOperations[0].Index) found = true } assert.True(t, found) @@ -113,22 +108,15 @@ func TestBlockTransaction(t *testing.T) { ret, err := blockAPIService.BlockTransaction(ctx, request) assert.Nil(t, err) assert.Equal(t, testTxHash, ret.Transaction.TransactionIdentifier.Hash) - assert.Equal(t, 5, len(ret.Transaction.Operations)) + assert.Equal(t, 4, len(ret.Transaction.Operations)) assert.Equal(t, klaytn.FeeOpType, ret.Transaction.Operations[0].Type) assert.Equal(t, klaytn.FeeOpType, ret.Transaction.Operations[1].Type) - assert.Equal(t, klaytn.FeeOpType, ret.Transaction.Operations[2].Type) assert.Equal(t, int64(0), ret.Transaction.Operations[0].OperationIdentifier.Index) assert.Equal(t, int64(1), ret.Transaction.Operations[1].OperationIdentifier.Index) assert.Equal(t, int64(2), ret.Transaction.Operations[2].OperationIdentifier.Index) - assert.Equal(t, 2, len(ret.Transaction.Operations[2].RelatedOperations)) - assert.Equal(t, int64(0), ret.Transaction.Operations[2].RelatedOperations[0].Index) - assert.Equal(t, int64(1), ret.Transaction.Operations[2].RelatedOperations[1].Index) - assert.Equal(t, klaytn.CallOpType, ret.Transaction.Operations[3].Type) - assert.Equal(t, klaytn.CallOpType, ret.Transaction.Operations[4].Type) assert.Equal(t, int64(3), ret.Transaction.Operations[3].OperationIdentifier.Index) - assert.Equal(t, int64(4), ret.Transaction.Operations[4].OperationIdentifier.Index) - assert.Equal(t, 1, len(ret.Transaction.Operations[4].RelatedOperations)) - assert.Equal(t, int64(3), ret.Transaction.Operations[4].RelatedOperations[0].Index) + assert.Equal(t, 1, len(ret.Transaction.Operations[3].RelatedOperations)) + assert.Equal(t, int64(2), ret.Transaction.Operations[3].RelatedOperations[0].Index) } // Test /block/transaction with invalid data diff --git a/services/network_service_test.go b/services/network_service_test.go index a14c615..7911043 100644 --- a/services/network_service_test.go +++ b/services/network_service_test.go @@ -32,7 +32,7 @@ import ( var ( // rosetta-klaytn version - middlewareVersion = "1.0.4" + middlewareVersion = "1.0.5" defaultNetworkOptions = &types.NetworkOptionsResponse{ Version: &types.Version{