concept contract state in category ethereum
appears as: contract state, contract state

This is an excerpt from Manning's book Building Ethereum Dapps: Decentralized applications on the Ethereum blockchain.
Each node that has received a new block verifies whether the individual transactions included in it are genuine and whether the block as a whole is valid. It then processes all the transactions present in it. While doing this, it implicitly verifies the validity of the contract state. For example, the vote submission logic might include an invariant verifying that the number of votes cast for a candidate, or the total number of votes cast for all candidates, isn’t higher than the number of registered voters. If the node verifies the block successfully, it relays it to its peer nodes, which perform the same validation and propagation action until the whole network has acquired the new blockchain block. (The verification process will become clearer to you in the next chapter, when I’ll present the cryptographic techniques it’s based on.)
Your tests should cover positive checks, verifying the contract state has been successfully modified by the function logic when the function is called from an authorized account and with valid input. You also should write tests against the constructor to verify that the contract owner and the contract state are initialized correctly.