Blockchain has been progressively applied to various Internet of Things (IoT) platforms. As the efficiency of the blockchain depends on its computing capability, how to make sure the acquisition of the computational resources and participation of the devices would be the driving force. In this work, an edge computing-based blockchain network is considered, where the edge service provider (ESP) offers computational resources for the miners. The focus is to investigate an efficient incentive mechanism for the miners to purchase the computational resources. Accordingly, a two-stage Stackelberg game is formulated between the miners and ESP. By exploring the Stackelberg equilibrium of the optimal mining strategy under two different mining schemes. The aim is to find the optimal incentive for the ESP and miners to choose auto-fit strategies. Through theoretical analysis and numerical simulation, we demonstrate the effectiveness of the proposed scheme on encouraging devices to participate the Blockchain.