We have installed truffle to two nodes and we initialize our private blockchain with: $geth --datadir node init genesis.json
Then we run geth on both nodes with: $geth --datadir node --nodiscover -rpc --rpcapi="db,eth,net,web3,personal,web3" console
We are using same genesis.json files.
After that, we migrate contract on both nodes, and we are using:
ContractName.deployed() var contract = ContractName.at('address')
Then in the two nodes we run function like that:
contract.then(function(cI){cI.addValue().then(function(v){console.log(v)})})
However, after a node run the contract, other node don't run on the same contract, I mean, if we want to show the values added to an array, every node shows it's own array, not a single one.
Are we running contracts in two nodes in a wrong way?
Edit: Solved the problem. We have migrated smart contract on a single node, then in all nodes, we simply created a contract instance with
var contract = ContractName.at('address')