Merge pull request #4382 from filecoin-project/asr/invoc-result

Add message CID to InvocResult
This commit is contained in:
Aayush Rajasekaran 2020-10-14 02:06:09 -04:00 committed by GitHub
commit bf619862c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 0 deletions

View File

@ -737,6 +737,7 @@ type RetrievalOrder struct {
}
type InvocResult struct {
MsgCid cid.Cid
Msg *types.Message
MsgRct *types.MessageReceipt
ExecutionTrace types.ExecutionTrace

View File

@ -113,6 +113,7 @@ func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.
}
return &api.InvocResult{
MsgCid: msg.Cid(),
Msg: msg,
MsgRct: &ret.MessageReceipt,
ExecutionTrace: ret.ExecutionTrace,
@ -228,6 +229,7 @@ func (sm *StateManager) CallWithGas(ctx context.Context, msg *types.Message, pri
}
return &api.InvocResult{
MsgCid: msg.Cid(),
Msg: msg,
MsgRct: &ret.MessageReceipt,
ExecutionTrace: ret.ExecutionTrace,

View File

@ -200,6 +200,7 @@ func (sm *StateManager) TipSetState(ctx context.Context, ts *types.TipSet) (st c
func traceFunc(trace *[]*api.InvocResult) func(mcid cid.Cid, msg *types.Message, ret *vm.ApplyRet) error {
return func(mcid cid.Cid, msg *types.Message, ret *vm.ApplyRet) error {
ir := &api.InvocResult{
MsgCid: mcid,
Msg: msg,
MsgRct: &ret.MessageReceipt,
ExecutionTrace: ret.ExecutionTrace,

View File

@ -3077,6 +3077,9 @@ Inputs:
Response:
```json
{
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Msg": {
"Version": 42,
"To": "f01234",
@ -4097,6 +4100,9 @@ Inputs:
Response:
```json
{
"MsgCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Msg": {
"Version": 42,
"To": "f01234",

View File

@ -362,6 +362,7 @@ func (a *StateAPI) StateReplay(ctx context.Context, tsk types.TipSetKey, mc cid.
}
return &api.InvocResult{
MsgCid: mc,
Msg: m,
MsgRct: &r.MessageReceipt,
ExecutionTrace: r.ExecutionTrace,