Transfer Asset API not working

+2 votes

Hi,

I have one admin node A1 which is running as -daemon and other node A2 which is pointing to A1 and the setup is on Windows and I am running A2 as :

multichaind A2@IP_Address_Of_A1_Node:Port_Of_A1_Node

Now for transferring asset from Node A1 to Node A2 , i have imported the address of A2 node into A1 wallet.

As when I am trying getaddresses command on A1 wallet I am getting the address of both the nodes here.

But the point of Concern here is :

When on A1 node I am entering getpeerinfo() , It gives me an empty array.

Because of this when I am transferring an asset from Node A1 to Node A2, this transfer is happening on A1's wallet only means transfer happens from Address of A1 to Imported Address of A2 but this happens on A1's wallet only. 

The actual case is that Node A1 is performing transfer but Node A2 is not aware of it .

And when I login to my application with Node A2 creadentials , the balance there is not getting updated.

What i think is my nodes are not having proper sync up or they are not conected to each other that is why transfer happens locally and not globally.

Can you please suggest on this issue that how to connect both these two nodes so that when I am transfer any asset , it gets transferred from Node A1 and Node A2 sees the updated balance ? 

asked Mar 28, 2018 by am1789

1 Answer

0 votes
You need to ensure your firewall on one or the other server is allowing the nodes to connect to each other, then if necessary use the addnode API to add the new peer.
answered Mar 28, 2018 by MultiChain
How can we ensure the firewall connection so that both the nodes are connected to each other . Add node API I used and child node's address got added to this Admin node's wallet but when I am triggering the getpeerinfo() on admin Node then an empty array is returned .
As you said that Firewall connection must be ensured . Can you please help how can we check the firewall connection ? As in what approach should I follow.

Thanks in Advance !
This will depend on your operating system and I'm afraid is beyond our scope here. If you're on Linux, try reading about the iptables tool.
...