In Bitcoin source, what is the UniValue objects purpose?

1

In the bitcoin source code you can see a lot of objects of type UniValue, particularly in the miner.cpp and rpc/mining.cpp. What is the utility of this UniValue object? Is it used to update the blockchain, or simply to return a message to a miner in their console?

Barney Chambers

Posted 2018-01-02T10:19:39.917

Reputation: 291

Answers

3

UniValue is a type that encapsulates a JSON value.

It is only used for communication with external utilities through the RPC interface.

Pieter Wuille

Posted 2018-01-02T10:19:39.917

Reputation: 54 032

Thanks, what do you mean by external utilitiesBarney Chambers 2018-01-02T10:45:24.320

Anything that wants to communicate with Bitcoin Core.Pieter Wuille 2018-01-02T11:11:01.710