A Blockchain is a distributed public ledger that hold immutable data in a secure and encrypted way to ensure that a transaction is safe and cannot be altered. It is implemented based on a consensus algorithm called Proof-of-Work (PoW) which confirms transactions and produces new blocks to the chain. With PoW, miners compete against each other to complete transactions on the network and get rewarded. In this paper, we simulate bitcoin, which is a well-known example of a Blockchain, to perform tasks such as network and blockchain simulation, and being the subject of a double spending attacks using a framework established by Arthur Gervais. This framework is utilized to evaluate the doublespending behavior of bitcoin based on an average attacker's hashrate as a proxy measure of the security of processed transactions. This stimulation runs in a discrete-event network simulator called NS-3. The result of this simulation shows that an increase in attacker's hashrate is parallel with an increase in number of double-spending attacks, an increase in attacker's income and the number of stale blocks posing a threat to transaction's security. Stale blocks increase the advantage of attacker in the double spending attacks in the network.