fixed fromAccount in re-delegate tx

pull/4065/head
haodi 3 years ago
parent 8eb5291303
commit 4da2a80a30
  1. 4
      core/evm.go

@ -218,11 +218,13 @@ func DelegateFn(ref *block.Header, chain ChainContext) vm.DelegateFunc {
//add rosetta log //add rosetta log
if rosettaTracer != nil { if rosettaTracer != nil {
// copy from address
fromAccount := common.BytesToAddress(key.Bytes())
rosettaTracer.AddRosettaLog( rosettaTracer.AddRosettaLog(
vm.CALL, vm.CALL,
&vm.RosettaLogAddressItem{ &vm.RosettaLogAddressItem{
Account: &delegate.DelegatorAddress, Account: &delegate.DelegatorAddress,
SubAccount: &key, SubAccount: &fromAccount,
Metadata: map[string]interface{}{"type": "undelegation"}, Metadata: map[string]interface{}{"type": "undelegation"},
}, },
&vm.RosettaLogAddressItem{ &vm.RosettaLogAddressItem{

Loading…
Cancel
Save