Using Blockchain to Decentralize the Internet of Things Network