diff --git a/codec/antelope/v3.1/eos_to_proto.go b/codec/antelope/v3.1/eos_to_proto.go index d40a0ec..6294fe8 100644 --- a/codec/antelope/v3.1/eos_to_proto.go +++ b/codec/antelope/v3.1/eos_to_proto.go @@ -2,16 +2,19 @@ package antelope import ( "fmt" + "math" + "sort" + "github.com/EOS-Nation/firehose-antelope/codec/antelope" - "github.com/EOS-Nation/firehose-antelope/types/pb/sf/antelope/type/v1" + pbantelope "github.com/EOS-Nation/firehose-antelope/types/pb/sf/antelope/type/v1" "github.com/eoscanada/eos-go" "github.com/eoscanada/eos-go/ecc" "go.uber.org/zap" "google.golang.org/protobuf/types/known/timestamppb" - "math" - "sort" ) +const consoleTextLimit = 10000 + func TransactionReceiptToDEOS(txReceipt *TransactionReceipt) *pbantelope.TransactionReceipt { receipt := &pbantelope.TransactionReceipt{ Status: TransactionStatusToDEOS(txReceipt.Status), @@ -137,7 +140,7 @@ func ActionTraceToDEOS(in *ActionTrace, execIndex uint32, opts ...antelope.Conve Receiver: string(in.Receiver), Action: antelope.ActionToDEOS(in.Action), Elapsed: int64(in.ElapsedUs), - Console: string(in.Console), + Console: string(in.Console)[0:consoleTextLimit], TransactionId: in.TransactionID.String(), ContextFree: in.ContextFree, ProducerBlockId: in.ProducerBlockID.String(), diff --git a/proto/sf/antelope/type/v1/type.proto b/proto/sf/antelope/type/v1/type.proto index 8af9674..e9c6399 100644 --- a/proto/sf/antelope/type/v1/type.proto +++ b/proto/sf/antelope/type/v1/type.proto @@ -562,7 +562,7 @@ message ActionTrace { Action action = 2; bool context_free = 3; int64 elapsed = 4; - string console = 5; + string console = 5; // limited to 10000 characters string transaction_id = 6; uint64 block_num = 7; string producer_block_id = 8;