From a5872743512c34bdcd311d2082363fdffb856c52 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Mon, 18 May 2020 18:33:55 +0300 Subject: [PATCH] compiler|transaction: remove transaction.GetUnspentCoins support It's useless. Even though there is Neo.Transaction.GetUnspentCoins syscall that can be used, its return type is an interop structure that's not accepted by any other syscall, so you can't really do anything with it. And there is no such interface for the .net Framework. --- docs/runtime.md | 6 ------ pkg/compiler/syscall.go | 15 +++++++-------- pkg/interop/transaction/transaction.go | 6 ------ 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/docs/runtime.md b/docs/runtime.md index e98b3af20..7f047db2f 100644 --- a/docs/runtime.md +++ b/docs/runtime.md @@ -504,12 +504,6 @@ GetReferences(t Transacfion) interface{} ``` Returns the references of the given transaction. -#### GetUnspentCoins -``` -GetUnspentCoins(t Transacfion) interface{} -``` -Returns the unspent coins of the given transaction. - #### GetOutputs ``` GetOutputs(t Transacfion) []output.Output diff --git a/pkg/compiler/syscall.go b/pkg/compiler/syscall.go index 2459a49e6..bb6429f10 100644 --- a/pkg/compiler/syscall.go +++ b/pkg/compiler/syscall.go @@ -62,14 +62,13 @@ var syscalls = map[string]map[string]string{ "GetTransaction": "Neo.Block.GetTransaction", }, "transaction": { - "GetHash": "Neo.Transaction.GetHash", - "GetType": "Neo.Transaction.GetType", - "GetAttributes": "Neo.Transaction.GetAttributes", - "GetInputs": "Neo.Transaction.GetInputs", - "GetOutputs": "Neo.Transaction.GetOutputs", - "GetReferences": "Neo.Transaction.GetReferences", - "GetUnspentCoins": "Neo.Transaction.GetUnspentCoins", - "GetScript": "Neo.InvocationTransaction.GetScript", + "GetAttributes": "Neo.Transaction.GetAttributes", + "GetHash": "Neo.Transaction.GetHash", + "GetInputs": "Neo.Transaction.GetInputs", + "GetOutputs": "Neo.Transaction.GetOutputs", + "GetReferences": "Neo.Transaction.GetReferences", + "GetScript": "Neo.InvocationTransaction.GetScript", + "GetType": "Neo.Transaction.GetType", }, "asset": { "Create": "Neo.Asset.Create", diff --git a/pkg/interop/transaction/transaction.go b/pkg/interop/transaction/transaction.go index 354fcf019..b412fe92f 100644 --- a/pkg/interop/transaction/transaction.go +++ b/pkg/interop/transaction/transaction.go @@ -33,12 +33,6 @@ func GetReferences(t Transaction) []interface{} { return []interface{}{} } -// GetUnspentCoins returns the unspent coins for the given transaction. -// FIXME: What is the correct return type for this? -func GetUnspentCoins(t Transaction) interface{} { - return 0 -} - // GetInputs returns the inputs of the given transaction. func GetInputs(t Transaction) []input.Input { return []input.Input{}