Merge pull request #10258 from filecoin-project/steb/fix-msg-modify
fix: stmgr: copy the message before modifying it
This commit is contained in:
commit
86b4aeef1a
@ -31,6 +31,10 @@ var ErrExpensiveFork = errors.New("refusing explicit call due to state fork at e
|
|||||||
// tipset's parent. In the presence of null blocks, the height at which the message is invoked may
|
// tipset's parent. In the presence of null blocks, the height at which the message is invoked may
|
||||||
// be less than the specified tipset.
|
// be less than the specified tipset.
|
||||||
func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*api.InvocResult, error) {
|
func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*api.InvocResult, error) {
|
||||||
|
// Copy the message as we modify it below.
|
||||||
|
msgCopy := *msg
|
||||||
|
msg = &msgCopy
|
||||||
|
|
||||||
if msg.GasLimit == 0 {
|
if msg.GasLimit == 0 {
|
||||||
msg.GasLimit = build.BlockGasLimit
|
msg.GasLimit = build.BlockGasLimit
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user