Update findcheckpoint to support testnet and dbtype.