I am a bit confused with the fallback function in Solidity using Remix IDE, as far as I understand, the fallback function is limited to 2300 gas. However, when I call the fallback function by using the 'Transact' button in Remix, it does not fail even though it uses more than 2300 gas.
// let anyone send ether to the contract
fallback() external payable {
require(msg.data.length == 0);
}
Am I misunderstanding how fallback functions work and is my implementation of the fallback secure for when I want users to be able to send Ether to the contract? I also check the length of the data to ensure the function isn't used for other purposes.