A Protecting Mechanism Against Double Spending Attack in Blockchain Systems