Check if this block activates UAHF. The next block is fork block and must be > 1MB.
| 8 | |
| 9 | // Check if this block activates UAHF. The next block is fork block and must be > 1MB. |
| 10 | bool IsUAHFActivatingBlock(int64_t mtpCurrent, CBlockIndex* pindexPrev) { |
| 11 | if (!Opt().UAHFTime()) |
| 12 | return false; |
| 13 | |
| 14 | if (mtpCurrent < Opt().UAHFTime()) |
| 15 | return false; |
| 16 | |
| 17 | if (pindexPrev == nullptr) |
| 18 | // we activated at genesis (happens in regtest) |
| 19 | return true; |
| 20 | |
| 21 | return pindexPrev->GetMedianTimePast() < Opt().UAHFTime(); |
| 22 | } |