Commit e99d18e3 authored by Jason Yellick's avatar Jason Yellick
Browse files

[FAB-5113] Clarify chaincode GetState doc

The current documentation does not make it clear what the behavior of
GetState is when the key does not exist.  This CR simply adds another
line to the documentation indicating that (nil, nil) will be returned so
that the chaincode developer does not have to guess or test this

Change-Id: Ic610c3c488bd2b45482371231744c7a5579c7137
Signed-off-by: default avatarJason Yellick <>
parent b93fb81c
......@@ -83,6 +83,7 @@ type ChaincodeStubInterface interface {
// ledger. Note that GetState doesn't read data from the writeset, which
// has not been committed to the ledger. In other words, GetState doesn't
// consider data modified by PutState that has not been committed.
// If the key does not exist in the state database, (nil, nil) is returned.
GetState(key string) ([]byte, error)
// PutState puts the specified `key` and `value` into the transaction's
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment