Skip to content

Commit

Permalink
KernelInterfaceForFastVM implements cross-vm call check
Browse files Browse the repository at this point in the history
- This check is empty currently, it always returns true. But eventually
  we will need real logic here so that the interface can tell the fastvm
  that it is calling an Avm contract and to fail.
  • Loading branch information
aionick committed Jan 18, 2019
1 parent fd113d4 commit 09472b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion aion_vm_api
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,11 @@ public boolean isValidEnergyLimitForCreate(long energyLimit) {
public boolean isValidEnergyLimitForNonCreate(long energyLimit) {
return (this.isLocalCall) ? true : TxNrgRule.isValidNrgTx(energyLimit);
}

@Override
public boolean destinationAddressIsSafeForThisVM(Address address) {
//TODO: replace with actual logic that prevents the FastVM from calling an Avm contract.
return true;
}

}

0 comments on commit 09472b1

Please sign in to comment.