<p>They will exchange chainwork. The one that claims a lower chainwork will query the other to confirm that its claim for a higher chainwork is legitimate. If it can confirm the claim, then it will switch to the chain with the higher total work.</p>

CC BY-SA 4.0
2020-11-05T12:26:24.813Z
"They will exchange chainwork"  you mean `headers` message?
Coding Enthusiast
CC BY-SA 4.0
2020-11-04T22:05:30.313Z
2020-11-04T22:05:30.313Z
David Schwartz
<p>When two nodes connect to each other and exchange getblocks messages but they have different blockchains will both nodes download each others blockchain to verify which has higher chainwork or will they somehow exchange chainwork beforehand or something completely different?</p>

<blockchain><network><protocol><best-chain>
How does initial exchange of inventory work when both nodes have different chains?
lixkel
# How does initial exchange of inventory work when both nodes have different chains?

(Asked by: username_0 on 2020-11-04)

When two nodes connect to each other and exchange getblocks messages but they have different blockchains will both nodes download each others blockchain to verify which has higher chainwork or will they somehow exchange chainwork beforehand or something completely different?

**Tags:** blockchain, network, protocol, best-chain


---

## 1 answers

### Answer by username_1 on 2020-11-04. Score: 2

They will exchange chainwork. The one that claims a lower chainwork will query the other to confirm that its claim for a higher chainwork is legitimate. If it can confirm the claim, then it will switch to the chain with the higher total work.

> **Comments:**
> **username_2**: "They will exchange chainwork"  you mean `headers` message?  

---

