compound-finance / compound-protocol

The Compound On-Chain Protocol
https://compound.finance/developers
BSD 3-Clause "New" or "Revised" License
1.85k stars 1.19k forks source link

Add in-queue check for cancelTransaction() in Timelock.sol #213

Open AmazingAng opened 1 year ago

AmazingAng commented 1 year ago

Add in-queue check for cancelTransaction() in Timelock.sol :

        require(queuedTransactions[txHash], "Timelock::cancelTransaction: Transaction hasn't been queued.");

before deleting the transaction from the queue:

        queuedTransactions[txHash] = false;

Link to #214

AmazingAng commented 1 year ago
  1. Delete import SafeMath, since SafeMath is no longer needed starting with Solidity 0.8.
  2. Delete keyword "public" in constructor
Setland34 commented 1 year ago

Add in-queue check for cancelTransaction() in Timelock.sol :

        require(queuedTransactions[txHash], "Timelock::cancelTransaction: Transaction hasn't been queued.");

before deleting the transaction from the queue:

        queuedTransactions[txHash] = false;

Link to #214